-
Notifications
You must be signed in to change notification settings - Fork 46
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
Setup configuration to multiple transpiled codebase #311
Comments
While it's possible to set up something like this, RxJs is using jasmine for node to run tests and wallaby.js does not yet support jasmine for node.js tests #2. I'll let you know once it's supported. |
Thanks for confirmation. Actually spend some hrs after creating this issue, was about to spend more if I was not aware node.js with jasmine is yet supported. I'll wait for update. |
@kwonoj Jasmine integration implementation is already in progress, and shouldn't take too long. |
So Jasmine for node is ready - #21.
but eventually I managed to get it working, here is the config: module.exports = wallaby => ({
files: [
'index.js',
'src/**/*.ts',
{pattern: 'spec/helpers/test-helper.js', instrument: false}
],
tests: ['spec/**/*-spec.js'],
compilers: {
'**/*.ts': wallaby.compilers.typeScript({
module: 1, // commonjs
target: 2, // ES6
preserveConstEnums: true
})
},
preprocessors: {
'**/*.js': file => require('babel').transform(file.content, {sourceMap: true, loose: 'all'})
},
testFramework: 'jasmine',
env: {
type: 'node'
},
workers: {initial: 1, regular: 1},
bootstrap: function (w) {
// Remapping all require calls to `dist/cjs` right to `src`
var Module = require('module').Module;
if (!Module._originalRequire) {
var modulePrototype = Module.prototype;
Module._originalRequire = modulePrototype.require;
modulePrototype.require = function (filePath) {
return Module._originalRequire.call(this, filePath.replace('dist/cjs', 'src'));
};
}
// Global test helpers
require('./spec/helpers/test-helper');
}
}); I'm planning to create a pull request to the original repo so that the repo contributors could use wallaby if they like. |
Hi, I'm trying to setup wallaby on this repo where it's build script is currently configured as below:
(full script can be fount at package.json)
Due to several reason, this repo takes typescript source file into es6 build first, then create commonjs result from es6 transpiled build. Test cases are referencing final build of commonjs instead of es6.
How do I setup wallaby for this repo? I tried simple configuration such as beow (with atom plugin) but it wasn't successful.
Thanks in advance.
The text was updated successfully, but these errors were encountered: