You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few annoying things about running Jest within codebases that use Webpack generally, Batfish specifically.
Babel config is created behind the scenes for Webpack, combining Batfish defaults with user options (babelPlugins, babelPresets). Jest doesn't know about this; so if you want to write Jest tests for files that rely on this Batfish-generated Babel config, you have to reproduce it in a .babelrc file or something else Jest can read.
Batfish allows Webpack to allow you to import non-JS files. Jest doesn't run Webpack so it will break on non-JS imports. You need to configure Jest to ignore those.
Closes#214 by facilitating Babel-config sharing with test runners.
Closes#224 by allowing absolute paths for babelPlugins and
babelPresets. Those are now the expected format; functions are
deprecated.
Closes#214 by facilitating Babel-config sharing with test runners.
Closes#224 by allowing absolute paths for babelPlugins and
babelPresets. Those are now the expected format; functions are
deprecated.
Closes#214 by facilitating Babel-config sharing with test runners.
Closes#224 by allowing absolute paths for babelPlugins and
babelPresets. Those are now the expected format; functions are
deprecated.
Closes#214 by facilitating Babel-config sharing with test runners.
Closes#224 by allowing absolute paths for babelPlugins and
babelPresets. Those are now the expected format; functions are
deprecated.
There are a few annoying things about running Jest within codebases that use Webpack generally, Batfish specifically.
babelPlugins
,babelPresets
). Jest doesn't know about this; so if you want to write Jest tests for files that rely on this Batfish-generated Babel config, you have to reproduce it in a.babelrc
file or something else Jest can read.import
non-JS files. Jest doesn't run Webpack so it will break on non-JS imports. You need to configure Jest to ignore those.To deal with this, I think Batfish should export a
jest-transform
function that can be passed to Jest'stransform
config option, and it will try to take care of whatever transforms Jest needs to work with Webpack things.cf. jestjs/jest#1468 (comment), https://github.com/atecarlos/webpack-babel-jest/blob/master/index.js
The text was updated successfully, but these errors were encountered: