-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
fad5d27
to
31fcf24
Compare
Codecov Report
@@ Coverage Diff @@
## master #67 +/- ##
==========================================
- Coverage 68.94% 67.82% -1.12%
==========================================
Files 64 66 +2
Lines 1378 1411 +33
Branches 300 307 +7
==========================================
+ Hits 950 957 +7
- Misses 374 400 +26
Partials 54 54
Continue to review full report at Codecov.
|
31fcf24
to
53ee5a5
Compare
@@ -0,0 +1,10 @@ | |||
/* eslint-env node */ | |||
import {configure} from 'enzyme'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if people don't use enzyme in their tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary, but I think we should probably enable by default? We can add a config to turn this off though.
@@ -0,0 +1,4 @@ | |||
/* eslint-env node */ | |||
global.requestAnimationFrame = callback => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Required for running react tests in node - they ask you to bring your own polyfills.
53ee5a5
to
d07b6c0
Compare
build/test-app-runtime.js
Outdated
|
||
let command = require.resolve('jest-cli/bin/jest.js'); | ||
let args = [ | ||
// '--no-cache', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this should be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, though it's really useful for debugging.
build/jest-transformer.js
Outdated
const transformer = require('babel-jest').createTransformer({ | ||
presets: [ | ||
'babel-preset-flow', | ||
'babel-preset-es2015', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the es2015 preset required given that we require Node 8+?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try getting rid of it. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out this is required for modules to work. Might be able to do this with a smaller plugin, but since it's only for tests, I don't think it's too bad.
!merge |
Creates a fusion-cli command,
fusion test-app
, which wraps and runs jest.Exports a test() function which gets passed in a assert library for backwards compatibility.
Fixes #68