Comments (4)
Your import is wrong, you are importing the default
exports as two name.
So, you are actually nesting the top level test
statement.
Please import it properly.
import assert from 'node:assert/strict';
import { describe, it } from 'node:test';
describe("Array join test suit", () => {
it("should be able to join an array.", () => {
assert.strictEqual("123", [1,2,3].join(""))
});
});
from node.
I am not able to reproduce this, what is the exact command you run? is there anything else in the file? (there should be at least a import of node:test
and node:assert
)
from node.
@MoLow these are the imports at the top of the file:
import assert from "node:assert/strict";
import describe from "node:test";
import it from "node:test";
And this is the command to run the test: node --test file.test.mjs
I tried both using --test
and without, but same result.
from node.
@climba03003 you are correct. Fixing the import solves the issue.
from node.
Related Issues (20)
- compiling node on openBSD
- High cpu usage and traffic when using windows named pipes
- Node 20.11.1 doesn't contain libuv 1.48 HOT 2
- Support MockAgent for non-undici requests as well HOT 3
- Print a "current stack/callback/promise dump" from a running program HOT 2
- `os.homedir()` on Windows returns non-existent path HOT 1
- shellJS.exec() or child_process.exec() not executing callback function HOT 6
- stream.compose(...) doesn't destroy all active composed streams when it is destroyed
- fs.createWriteStream can cause out-of-order writes, in v18.16+ HOT 3
- test_runner: t.after is never called HOT 9
- Snapshot run failed on special RegExp HOT 5
- Throws assertion with match delegation
- test_runner (after) doesn't work on v21.7.0 HOT 1
- breaking change in 21.7.0 when mocking fetch HOT 4
- Enable --security-revert to be used in NODE_OPTIONS environment variable HOT 24
- Recursive fs.watch crashes on Linux when deleting files HOT 6
- [feat] Provide a standard way to get global and `npx` temporary `node_modules`
- http: create response.overwriteHead() for things like stream piping error handling HOT 5
- Node.js must support Windows Server 2016 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node.