Related to Object Cannot read property 'defineProperties'
We are experiencing the same problems when we are trying to run mocha unit tests in an example set-up with vuejs3. The example set-up was created using the vue cli with the basic
setting and after that running npm install --save gojs
.
import go from 'gojs';
describe('gojs test', () => {
it('should run', () => {
new go.Point(100, 200);
});
});
throws the following error:
$ npm run test:unit
> vue-gojs-mocha-test-example@0.1.0 test:unit /home/rein/dev/vue-gojs-mocha-test-example
> vue-cli-service test:unit
WEBPACK Compiling...
[=========================] 98% (after emitting)
DONE Compiled successfully in 1314ms
[=========================] 100% (completed)
WEBPACK Compiled successfully in 1314ms
MOCHA Testing...
RUNTIME EXCEPTION Exception occurred while loading your tests
TypeError: Cannot read property 'defineProperties' of undefined
at /home/rein/dev/vue-gojs-mocha-test-example/dist/js/webpack:/node_modules/gojs/release/go.js:21:1
We have looked at the issue for several hours but we cannot pinpoint why this is going wrong. Do you have any ideas?
You can reproduce the behavior as follows:
git clone https://github.com/eurogroep/vue-gojs-mocha-test-example.git
cd vue-gojs-mocha-test-example
npm ci
npm run test:unit
Thanks in advance!