Skip to content

svelt tests fail #1557

@stevedlawrence

Description

@stevedlawrence

Description

When running yarn test I get the following exception and stack trace:

$ mocha -r ts-node/register ./src/svelte/tests/**/*.test.ts

 Exception during run: Error: Unexpected module status 0. Cannot require() ES Module /home/slawrence/downloads/vscode/daffodil-vscode/node_modules/svelte/src/store/index-server.js because it is not yet fully loaded. This may be caused by a race condition if the module is simultaneously dynamically import()-ed via Promise.all(). Try await-ing the import() sequentially in a loop instead. (from /home/slawrence/downloads/vscode/daffodil-vscode/src/svelte/src/utilities/colorScheme.ts)
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at Function.fail (node:internal/assert:17:9)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:412:16)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1537:24)
    at Module._compile (node:internal/modules/cjs/loader:1688:5)
    at Module._extensions..js (node:internal/modules/cjs/loader:1839:10)
    at Object.require.extensions.<computed> [as .js] (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1441:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1263:12)
    at TracingChannel.traceSync (node:diagnostics_channel:328:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Module.require (node:internal/modules/cjs/loader:1463:12)
    at require (node:internal/modules/helpers:147:16)
    at Object.<anonymous> (/home/slawrence/downloads/vscode/daffodil-vscode/src/svelte/src/utilities/colorScheme.ts:18:1)
    at Module._compile (node:internal/modules/cjs/loader:1706:14)
    at Module.m._compile (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1839:10)
    at Object.require.extensions.<computed> [as .ts] (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1441:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1263:12)
    at TracingChannel.traceSync (node:diagnostics_channel:328:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Module.require (node:internal/modules/cjs/loader:1463:12)
    at require (node:internal/modules/helpers:147:16)
    at Object.<anonymous> (/home/slawrence/downloads/vscode/daffodil-vscode/src/svelte/src/stores/index.ts:19:1)
    at Module._compile (node:internal/modules/cjs/loader:1706:14)
    at Module.m._compile (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1839:10)
    at Object.require.extensions.<computed> [as .ts] (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1441:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1263:12)
    at TracingChannel.traceSync (node:diagnostics_channel:328:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Module.require (node:internal/modules/cjs/loader:1463:12)
    at require (node:internal/modules/helpers:147:16)
    at Object.<anonymous> (/home/slawrence/downloads/vscode/daffodil-vscode/src/svelte/tests/stores/index.test.ts:19:1)
    at Module._compile (node:internal/modules/cjs/loader:1706:14)
    at Module.m._compile (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1839:10)
    at Object.require.extensions.<computed> [as .ts] (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1441:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1263:12)
    at TracingChannel.traceSync (node:diagnostics_channel:328:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
    at Module.require (node:internal/modules/cjs/loader:1463:12)
    at require (node:internal/modules/helpers:147:16)
    at Object.exports.requireOrImport (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/mocha/lib/nodejs/esm-utils.js:53:16)
    at async Object.exports.loadFilesAsync (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
    at async singleRun (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/mocha/lib/cli/run-helpers.js:164:3)
    at async Object.exports.handler (/home/slawrence/downloads/vscode/daffodil-vscode/node_modules/mocha/lib/cli/run.js:379:5) {
  code: 'ERR_INTERNAL_ASSERTION'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Steps to Reproduce

[

  1. Clone the daffodil-vscode repo
  2. Run yarn package
  3. Run yarn test

Expected Behavior

All tests should pass

Actual Behavior

Svelte tests fail

Environment

[

  • Operating System(s): Fedora 23, Java 17
    ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions