Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I run all the tests? #18

Open
steinybot opened this issue Oct 10, 2021 · 1 comment
Open

How do I run all the tests? #18

steinybot opened this issue Oct 10, 2021 · 1 comment

Comments

@steinybot
Copy link

How do I run all the tests?

pnpm run test doesn't seem to run any of the E2E tests in ./__tests__ or in other places like src/html-inputs/__tests__.

@steinybot steinybot mentioned this issue Oct 10, 2021
3 tasks
@Toumash
Copy link

Toumash commented Dec 2, 2021

I cannot even run a single test.

pnpm i
pnpm run test 

results in

error details
pnpm test

> [email protected] test C:\repo\vite-plugin-chrome-extension
> cross-env TS_NODE_COMPILER_OPTIONS={\"module\":\"commonjs\"} mocha --file tests/unit/setup.ts --require ts-node/register --require tsconfig-paths/register


TSError: ⨯ Unable to compile TypeScript:
src/utils/helpers.ts:84:25 - error TS2571: Object is of type 'unknown'.

84             handleError(error.message);
                           ~~~~~

    at createTSError (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:513:12)
    at reportTSError (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:517:19)
    at getOutput (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:752:36)
    at Object.compile (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:968:32)
    at Module.m._compile (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:1056:42)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.require.extensions.<computed> [as .ts] (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:1059:12)       
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.<anonymous> (C:\repo\vite-plugin-chrome-extension\src\html-inputs\index.ts:6:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module.m._compile (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:1056:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.require.extensions.<computed> [as .ts] (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:1059:12)       
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.<anonymous> (C:\repo\vite-plugin-chrome-extension\tests\unit\processors\html.test.ts:29:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Module.m._compile (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:1056:23)
    at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Object.require.extensions.<computed> [as .ts] (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected][email protected]\node_modules\ts-node\src\index.ts:1059:12)       
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.exports.requireOrImport (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected]\node_modules\mocha\lib\esm-utils.js:42:12)
    at Object.exports.loadFilesAsync (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected]\node_modules\mocha\lib\esm-utils.js:55:34)
    at singleRun (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected]\node_modules\mocha\lib\cli\run-helpers.js:125:3)
    at Object.exports.handler (C:\repo\vite-plugin-chrome-extension\node_modules\.pnpm\[email protected]\node_modules\mocha\lib\cli\run.js:362:5)
 ELIFECYCLE  Test failed. See above for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants