-
Notifications
You must be signed in to change notification settings - Fork 45
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
Wallaby TypeScript Integration vs tsc #1050
Comments
Hi, First of all you'll need to update to the latest core as there was a bug with loading definition files that we have fixed recently. Once updated, you'll just need to add a couple of files to your wallaby config:
You need to do this, because one of the enums in the package is defined as If the enum was defined like others in the module, it would end up being defined in the generated module code, and this wouldn't be required. But because wallaby runs the TS complier on its own file cache, it needs to know about these couple of files (the definition file and the So here's the config that should work for you: module.exports = function(wallaby) {
process.env.WALLABY = 'true';
return {
files: [
'src/**/*.ts',
{pattern: 'tests/**/*.js*', instrument: false},
{pattern: 'tests/**/*.d.ts', instrument: false},
{pattern: 'node_modules/dts-dom/package.json', instrument: false},
{pattern: 'node_modules/dts-dom/bin/index.d.ts', instrument: false}
],
tests: [
'tests/**/*-test.ts'
],
env: {
type: 'node'
},
testFramework: 'ava',
debug: false
};
} (I have also expanded your |
Thanks 🚀 |
To have the enums in the typings and as well in the transpiled code they must not be declared as const. This way we could work around a problem with wallaby: wallabyjs/public#1050 (comment)
To have the enums in the typings and as well in the transpiled code they must not be declared as const. This way we could work around a problem with wallaby: wallabyjs/public#1050 (comment)
Hi there,
I have an issue configuring wallaby for my project (https://github.com/KnisterPeter/react-to-typescript-definitions/tree/wallaby).
In the referenced branch there is a wallaby.conf.js file which defines the setup and it looks fine. But when executing the tests 10 of them are failing.
When inspecting the instrumented wallaby code I noticed a difference from the tsc output when just running
npm test
.The difference is the handling of enum values (like in #160) but the const enum in my dependency is exported so it should work.
Any hint on what to change?
The text was updated successfully, but these errors were encountered: