Closed glendaviesnz closed 6 years ago
It looks like the file is not being compiled by wallaby TypeScript compiler. Looking at your config, I can only see two scenarios why it could happen:
.ts
extension, ie. as import ... from ./blah.selector.ts
, as opposed to import ... from ./blah.selector
,src/**/*.ts
.If you create a simple test (src/a.spec.ts
) file like:
import a from './blah.selector' // correct the path here, but not use .ts extension
it('should work', () => {
comsole.log(a)
})
and change your tests
to
tests: [
{pattern: 'src/a.spec.ts', load: false}
],
then does it work?
Doh! it was the .ts on the import statement - well spotted. Thanks, this issue can be closed.
Awesome, thanks for the update!
Issue description or question
We have wallaby running with an Angular 5 CLI app, and mostly runs as expected, but we get some unexpected token errors just in a few typescript files related to the type annotations, eg.
the line numbers for the error relate to the :number type annotation. If all the type annotations are removed from the file the error goes away - but that of course upsets our noImplicitAny flag. The file has .selector.ts as the extension.
Wallaby.js configuration file
Code editor or IDE name and version
Visual Studio Code v1.23.0
OS name and version
Windows