I was trying out this plugin and it seems it could work, however, there is an issue I am facing where the generated entry.js file has the import for my file twice:
import {expect} from 'chai'
import '../../source/custom-element'
describe('custom-element', () => {
it('can be tested', () => {
expect(true).to.equal(true)
})
})
The issue with the double import that in this case the CustomElementRegistry will be called multiple times with the same element definitions and thus yield an Error.
In any way, I don't think it's actually intended to import the same file multiple times. I've had a quick look at the code, and from what I can tell, there is no check if a particular file was already added, so this could be a very simple fix.
I was trying out this plugin and it seems it could work, however, there is an issue I am facing where the generated entry.js file has the import for my file twice:
The configuration is fairly simple:
The test itself:
The issue with the double import that in this case the CustomElementRegistry will be called multiple times with the same element definitions and thus yield an Error.
In any way, I don't think it's actually intended to import the same file multiple times. I've had a quick look at the code, and from what I can tell, there is no check if a particular file was already added, so this could be a very simple fix.