Skip to content

Commit

Permalink
fix: module tests and some snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
kulshekhar committed Feb 15, 2019
1 parent 8372b5e commit 999f889
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 108 deletions.
2 changes: 1 addition & 1 deletion e2e/__cases__/deep/src/Button/click.ts
@@ -1,4 +1,4 @@
import * as mod from './mod'
import mod from './mod'

export function click(foo: string) {
return `clicked ${mod(foo)}`
Expand Down
2 changes: 2 additions & 0 deletions e2e/__cases__/deep/src/tsconfig.base.json
Expand Up @@ -5,6 +5,8 @@
"forceConsistentCasingInFileNames": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"strict": true
}
}
2 changes: 1 addition & 1 deletion e2e/__cases__/module-kinds/ts-jest-tools.spec.ts
Expand Up @@ -3,7 +3,7 @@ import * as presets from 'ts-jest/presets'
import * as utils from 'ts-jest/utils'

test('presets', () => {
const presetKeys = ['transform', 'testMatch', 'moduleFileExtensions']
const presetKeys = ['transform']
expect(Object.keys(presets.defaults)).toEqual(presetKeys)
expect(presets.defaults).toEqual(require('ts-jest/presets/default/jest-preset'))
expect(presets.defaults).toEqual(require('ts-jest/jest-preset'))
Expand Down
8 changes: 4 additions & 4 deletions e2e/__tests__/__snapshots__/coverage.test.ts.snap
Expand Up @@ -7,8 +7,8 @@ exports[`using template "default" should report coverages 1`] = `
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 83.33 | 100 | 66.67 | 80 | |
Hello.ts | 83.33 | 100 | 66.67 | 80 | 5 |
All files | 80 | 100 | 66.67 | 75 | |
Hello.ts | 80 | 100 | 66.67 | 75 | 5 |
----------|----------|----------|----------|----------|-------------------|
===[ STDERR ]===================================================================
PASS ./Hello.spec.ts
Expand Down Expand Up @@ -99,8 +99,8 @@ exports[`using template "with-typescript-2-7" should report coverages 1`] = `
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 83.33 | 100 | 66.67 | 80 | |
Hello.ts | 83.33 | 100 | 66.67 | 80 | 5 |
All files | 80 | 100 | 66.67 | 75 | |
Hello.ts | 80 | 100 | 66.67 | 75 | 5 |
----------|----------|----------|----------|----------|-------------------|
===[ STDERR ]===================================================================
PASS ./Hello.spec.ts
Expand Down
21 changes: 3 additions & 18 deletions e2e/__tests__/__snapshots__/deep-path.test.ts.snap
Expand Up @@ -36,12 +36,7 @@ exports[`Deep paths test should pass using template "default": output 1`] = `
√ npm -s run test
↳ exit code: 0
===[ STDOUT ]===================================================================
=============================== Coverage summary ===============================
Statements : 100% ( 6/6 )
Branches : 100% ( 0/0 )
Functions : 100% ( 2/2 )
Lines : 100% ( 6/6 )
================================================================================
===[ STDERR ]===================================================================
PASS Button/click.test.ts
√ button should click!
Expand Down Expand Up @@ -144,12 +139,7 @@ exports[`Deep paths test should pass using template "with-babel-7": output 1`] =
√ npm -s run test
↳ exit code: 0
===[ STDOUT ]===================================================================
=============================== Coverage summary ===============================
Statements : 100% ( 6/6 )
Branches : 100% ( 0/0 )
Functions : 100% ( 2/2 )
Lines : 100% ( 6/6 )
================================================================================
===[ STDERR ]===================================================================
PASS Button/click.test.ts
√ button should click!
Expand Down Expand Up @@ -252,12 +242,7 @@ exports[`Deep paths test should pass using template "with-typescript-2-7": outpu
√ npm -s run test
↳ exit code: 0
===[ STDOUT ]===================================================================
=============================== Coverage summary ===============================
Statements : 100% ( 6/6 )
Branches : 100% ( 0/0 )
Functions : 100% ( 2/2 )
Lines : 100% ( 6/6 )
================================================================================
===[ STDERR ]===================================================================
PASS Button/click.test.ts
√ button should click!
Expand Down
7 changes: 3 additions & 4 deletions e2e/__tests__/__snapshots__/logger.test.ts.snap
Expand Up @@ -97,9 +97,9 @@ Array [
"[level:20] backporting config",
"[level:20] normalized jest config",
"[level:20] normalized ts-jest config",
"[level:20] loaded module babel-core",
"[level:20] patching babel-core",
"[level:20] checking version of babel-core: OK",
"[level:20] loaded module @babel/core",
"[level:20] patching @babel/core",
"[level:20] checking version of @babel/core: OK",
"[level:20] normalized babel config",
"[level:20] loaded module typescript",
"[level:20] patching typescript",
Expand All @@ -108,7 +108,6 @@ Array [
"[level:20] normalized typescript config",
"[level:20] processing <cwd>/Hello.spec.ts",
"[level:20] creating babel-jest transformer",
"[level:20] loaded module babel-core",
"[level:20] loaded module babel-jest",
"[level:20] patching babel-jest",
"[level:20] checking version of babel-jest: OK",
Expand Down

0 comments on commit 999f889

Please sign in to comment.