Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update e2e templates #1330

Merged
merged 4 commits into from
Dec 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
571 changes: 313 additions & 258 deletions e2e/__templates__/default/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions e2e/__templates__/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"version": "0.0.0-tmpl.0",
"private": true,
"devDependencies": {
"@types/jest": "24.0.6",
"@types/node": "10.12.5",
"@types/jest": "24.0.25",
"@types/node": "10.17.13",
"jest": "24.9.0",
"typescript": "3.4.5"
"typescript": "3.7.4"
},
"wantedDependencies": {
"@types/jest": "latest",
Expand Down
682 changes: 353 additions & 329 deletions e2e/__templates__/with-babel-7/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions e2e/__templates__/with-babel-7/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"version": "0.0.0-tmpl.0",
"private": true,
"devDependencies": {
"@babel/core": "7.1.5",
"@types/jest": "24.0.6",
"@types/node": "10.12.5",
"babel-jest": "24.1.0",
"@babel/core": "7.7.7",
"@types/jest": "24.0.25",
"@types/node": "10.17.13",
"babel-jest": "24.9.0",
"jest": "24.9.0",
"typescript": "3.1.6"
"typescript": "3.7.4"
},
"wantedDependencies": {
"@babel/core": "7",
Expand Down
571 changes: 313 additions & 258 deletions e2e/__templates__/with-typescript-2-7/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions e2e/__templates__/with-typescript-2-7/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.0-tmpl.0",
"private": true,
"devDependencies": {
"@types/jest": "24.0.6",
"@types/node": "10.12.5",
"@types/jest": "24.0.25",
"@types/node": "10.17.13",
"jest": "24.9.0",
"typescript": "2.7.2"
},
Expand Down
571 changes: 313 additions & 258 deletions e2e/__templates__/with-unsupported-version/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions e2e/__templates__/with-unsupported-version/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.0-tmpl.0",
"private": true,
"devDependencies": {
"@types/jest": "24.0.6",
"@types/node": "10.12.5",
"@types/jest": "24.0.25",
"@types/node": "10.17.13",
"jest": "24.9.0",
"typescript": "2.5.3"
},
Expand Down
12 changes: 9 additions & 3 deletions e2e/__tests__/module-kinds/__snapshots__/amd.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ exports[`run with options: {"module":"amd","allowSyntheticDefaultImports":false}
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down Expand Up @@ -123,10 +128,11 @@ exports[`run with options: {"module":"amd","esModuleInterop":true} 1`] = `
PASS ./ts-jest-tools.spec.ts
PASS ./import-legacy.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-star.spec.ts:5:10 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof lib' has no compatible call signatures.
import-star.spec.ts:5:10 - error TS2349: This expression is not callable.
Type 'typeof lib' has no call signatures.

5 expect(lib()).toBe('foo')
~~~~~
~~~

import-star.spec.ts:1:1
1 import * as lib from './lib'
Expand Down
26 changes: 21 additions & 5 deletions e2e/__tests__/module-kinds/__snapshots__/commonjs.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@ exports[`run with options: {"module":"commonjs","allowSyntheticDefaultImports":f
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down Expand Up @@ -85,10 +90,15 @@ exports[`run with options: {"module":"commonjs","esModuleInterop":false} 1`] = `
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down Expand Up @@ -124,10 +134,11 @@ exports[`run with options: {"module":"commonjs","esModuleInterop":true} 1`] = `
PASS ./ts-jest-tools.spec.ts
PASS ./import-legacy.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-star.spec.ts:5:10 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof lib' has no compatible call signatures.
import-star.spec.ts:5:10 - error TS2349: This expression is not callable.
Type 'typeof lib' has no call signatures.

5 expect(lib()).toBe('foo')
~~~~~
~~~

import-star.spec.ts:1:1
1 import * as lib from './lib'
Expand Down Expand Up @@ -171,10 +182,15 @@ exports[`run with options: {"module":"commonjs"} 1`] = `
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down
12 changes: 9 additions & 3 deletions e2e/__tests__/module-kinds/__snapshots__/es2015.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ exports[`run with options: {"module":"es2015","allowSyntheticDefaultImports":fal
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down Expand Up @@ -123,10 +128,11 @@ exports[`run with options: {"module":"es2015","esModuleInterop":true} 1`] = `
PASS ./ts-jest-tools.spec.ts
PASS ./import-legacy.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-star.spec.ts:5:10 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof lib' has no compatible call signatures.
import-star.spec.ts:5:10 - error TS2349: This expression is not callable.
Type 'typeof lib' has no call signatures.

5 expect(lib()).toBe('foo')
~~~~~
~~~

import-star.spec.ts:1:1
1 import * as lib from './lib'
Expand Down
12 changes: 9 additions & 3 deletions e2e/__tests__/module-kinds/__snapshots__/esnext.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ exports[`run with options: {"module":"esnext","allowSyntheticDefaultImports":fal
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down Expand Up @@ -123,10 +128,11 @@ exports[`run with options: {"module":"esnext","esModuleInterop":true} 1`] = `
PASS ./ts-jest-tools.spec.ts
PASS ./import-legacy.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-star.spec.ts:5:10 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof lib' has no compatible call signatures.
import-star.spec.ts:5:10 - error TS2349: This expression is not callable.
Type 'typeof lib' has no call signatures.

5 expect(lib()).toBe('foo')
~~~~~
~~~

import-star.spec.ts:1:1
1 import * as lib from './lib'
Expand Down
12 changes: 9 additions & 3 deletions e2e/__tests__/module-kinds/__snapshots__/none.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ exports[`run with options: {"module":"none","allowSyntheticDefaultImports":false
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down Expand Up @@ -123,10 +128,11 @@ exports[`run with options: {"module":"none","esModuleInterop":true} 1`] = `
PASS ./ts-jest-tools.spec.ts
PASS ./import-legacy.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-star.spec.ts:5:10 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof lib' has no compatible call signatures.
import-star.spec.ts:5:10 - error TS2349: This expression is not callable.
Type 'typeof lib' has no call signatures.

5 expect(lib()).toBe('foo')
~~~~~
~~~

import-star.spec.ts:1:1
1 import * as lib from './lib'
Expand Down
12 changes: 9 additions & 3 deletions e2e/__tests__/module-kinds/__snapshots__/system.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ exports[`run with options: {"module":"system","allowSyntheticDefaultImports":fal
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down Expand Up @@ -123,10 +128,11 @@ exports[`run with options: {"module":"system","esModuleInterop":true} 1`] = `
PASS ./ts-jest-tools.spec.ts
PASS ./import-legacy.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-star.spec.ts:5:10 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof lib' has no compatible call signatures.
import-star.spec.ts:5:10 - error TS2349: This expression is not callable.
Type 'typeof lib' has no call signatures.

5 expect(lib()).toBe('foo')
~~~~~
~~~

import-star.spec.ts:1:1
1 import * as lib from './lib'
Expand Down
12 changes: 9 additions & 3 deletions e2e/__tests__/module-kinds/__snapshots__/umd.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ exports[`run with options: {"module":"umd","allowSyntheticDefaultImports":false}
PASS ./import-legacy.spec.ts
PASS ./import-star.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-default.spec.ts:1:8 - error TS1192: Module '"<cwd>/lib"' has no default export.
import-default.spec.ts:1:8 - error TS1259: Module '"<cwd>/lib"' can only be default-imported using the 'esModuleInterop' flag

1 import lib from './lib'
~~~

lib.d.ts:5:1
5 export = lib
~~~~~~~~~~~~
This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.
FAIL ./import-default.spec.ts
● import default

Expand Down Expand Up @@ -123,10 +128,11 @@ exports[`run with options: {"module":"umd","esModuleInterop":true} 1`] = `
PASS ./ts-jest-tools.spec.ts
PASS ./import-legacy.spec.ts
ts-jest[ts-compiler] (WARN) TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
import-star.spec.ts:5:10 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof lib' has no compatible call signatures.
import-star.spec.ts:5:10 - error TS2349: This expression is not callable.
Type 'typeof lib' has no call signatures.

5 expect(lib()).toBe('foo')
~~~~~
~~~

import-star.spec.ts:1:1
1 import * as lib from './lib'
Expand Down