test: add installation verification#359
Conversation
| @@ -0,0 +1,97 @@ | |||
|
|
|||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-install.ts
Outdated
| }); | ||
|
|
||
| TS_CODE.forEach((code) => { | ||
| it(`Should install and work with the Typescript code:\n${code}`, async function() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-install.ts
Outdated
| }); | ||
|
|
||
| JS_CODE.forEach((code) => { | ||
| it(`Should install and work with the Javascript code:\n${code}`, async function() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| @@ -0,0 +1,66 @@ | |||
|
|
|||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tsconfig.json
Outdated
| "node_modules", | ||
| "test/fixtures" | ||
| ] | ||
| } No newline at end of file |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
package.json
Outdated
| "posttest": "npm run check", | ||
| "prepack": "npm run compile", | ||
| "pretest-install": "npm run compile", | ||
| "test-install": "mocha build/test/test-install.js" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
package.json
Outdated
| "posttest": "npm run check" | ||
| "posttest": "npm run check", | ||
| "prepack": "npm run compile", | ||
| "pretest-install": "npm run compile", |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| return path.relative(BUILD_DIRECTORY, `node_modules/${nodule}`); | ||
| } | ||
|
|
||
| export function existsP(path: string): Promise<boolean> { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/utils.ts
Outdated
| }); | ||
| } | ||
|
|
||
| export function spawnP(command: string, args?: string[], options?: SpawnOptions, log?: (text: string) => void): Promise<void> { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-install.ts
Outdated
| debug.start({ allowExpressions: true }); | ||
| `; | ||
|
|
||
| const TS_CODE = [TS_CODE_1, TS_CODE_2, TS_CODE_3]; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
test/test-install.ts
Outdated
| allowExpressions: true | ||
| })`; | ||
|
|
||
| const JS_CODE = [JS_CODE_1, JS_CODE_2, JS_CODE_3]; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
511b17a to
2c244ea
Compare
|
@ofrobots @gaofanmichael PTAL |
test/test-install.ts
Outdated
| }); | ||
|
|
||
| TS_CODE_ARRAY.forEach((code) => { | ||
| it(`should install and work with the Typescript code:\n${code}`, async function() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| return path.relative(BUILD_DIRECTORY, `node_modules/${nodule}`); | ||
| } | ||
|
|
||
| export function existsP(path: string): Promise<boolean> { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
tsconfig.json
Outdated
| "exclude": [ | ||
| "node_modules" | ||
| "node_modules", | ||
| "test/fixtures" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
No description provided.