Skip to content

anchor test fails #353

Description

@ZuluSpl0it

I followed the instructions on the readme, but the test fails. I get:

Found a 'test' script in the Anchor.toml. Running it as a test suite!

Running test suite: "/root/strata/Anchor.toml"


> @strata-foundation/strata@1.0.0 test
> ts-mocha -p ./tsconfig.test.json -t 1000000 "tests/**/*.ts"

TypeError: Module "file:///root/strata/tsconfig.test.json" needs an import assertion of type "json"
    at new NodeError (node:internal/errors:387:5)
    at validateAssertions (node:internal/modules/esm/assert:82:15)
    at defaultLoad (node:internal/modules/esm/load:84:3)
    at nextLoad (node:internal/modules/esm/loader:165:28)
    at ESMLoader.load (node:internal/modules/esm/loader:608:26)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:464:22)
    at new ModuleJob (node:internal/modules/esm/module_job:63:26)
    at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:483:17)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:441:34)
    at async Promise.all (index 0)
    at ESMLoader.import (node:internal/modules/esm/loader:533:24)
    at importModuleDynamicallyWrapper (node:internal/vm/module:438:15)
    at formattedImport (/root/strata/node_modules/mocha/lib/nodejs/esm-utils.js:7:14)
    at Object.exports.requireOrImport (/root/strata/node_modules/mocha/lib/nodejs/esm-utils.js:48:32)
    at Object.exports.loadFilesAsync (/root/strata/node_modules/mocha/lib/nodejs/esm-utils.js:103:20)
    at singleRun (/root/strata/node_modules/mocha/lib/cli/run-helpers.js:125:3)
    at Object.exports.handler (/root/strata/node_modules/mocha/lib/cli/run.js:374:5)

I attempted to troubleshoot, but didn't get very far. I did read via google that it may be due to a mocha version update.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions