-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tests): do not use babel in our tests + new API for simple
- Loading branch information
Showing
5 changed files
with
75 additions
and
341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Simple test should pass with each template 1`] = ` | ||
Object { | ||
"default": jest exit code: 0 | ||
===[ STDOUT ]=================================================================== | ||
===[ STDERR ]=================================================================== | ||
PASS __tests__/Hello.test.ts | ||
Hello Class | ||
✓ should create a new Hello (XXms) | ||
Test Suites: 1 passed, 1 total | ||
Tests: 1 passed, 1 total | ||
Snapshots: 0 total | ||
Time: XXs | ||
Ran all test suites. | ||
================================================================================, | ||
"with-babel-7": jest exit code: 0 | ||
===[ STDOUT ]=================================================================== | ||
===[ STDERR ]=================================================================== | ||
PASS __tests__/Hello.test.ts | ||
Hello Class | ||
✓ should create a new Hello (XXms) | ||
Test Suites: 1 passed, 1 total | ||
Tests: 1 passed, 1 total | ||
Snapshots: 0 total | ||
Time: XXs | ||
Ran all test suites. | ||
================================================================================, | ||
"with-jest-22": jest exit code: 0 | ||
===[ STDOUT ]=================================================================== | ||
===[ STDERR ]=================================================================== | ||
PASS __tests__/Hello.test.ts | ||
Hello Class | ||
✓ should create a new Hello (XXms) | ||
Test Suites: 1 passed, 1 total | ||
Tests: 1 passed, 1 total | ||
Snapshots: 0 total | ||
Time: XXs | ||
Ran all test suites. | ||
================================================================================, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
import configureTestCase from '../__helpers__/test-case'; | ||
|
||
describe('Simple test', () => { | ||
it('should pass with babel 6', () => { | ||
const testCase = configureTestCase('simple'); | ||
expect(testCase.run(0).status).toBe(0); | ||
}); | ||
it('should pass with babel 7', () => { | ||
const testCase = configureTestCase('simple', { template: 'with-babel-7' }); | ||
expect(testCase.run(0).status).toBe(0); | ||
}); | ||
it('should pass with jest 22', () => { | ||
const testCase = configureTestCase('simple', { template: 'with-jest-22' }); | ||
expect(testCase.run(0).status).toBe(0); | ||
it('should pass with each template', () => { | ||
const testCase = configureTestCase('simple', { args: ['--no-cache'] }); | ||
const result = testCase.runWithTemplates( | ||
0, | ||
'default', | ||
'with-babel-7', | ||
'with-jest-22', | ||
); | ||
expect(result).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ module.exports = { | |
globals: { | ||
'ts-jest': { | ||
tsConfig: 'tsconfig.base.json', | ||
useBabelJest: false, | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.