Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0ca900a

Browse files
committed
Use Node test runner
1 parent85b9559 commit0ca900a

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

‎.github/workflows/main.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ jobs:
1717
strategy:
1818
matrix:
1919
node:
20-
-lts/fermium
20+
-lts/hydrogen
2121
-node

‎package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@
3535
"index.js"
3636
],
3737
"devDependencies": {
38-
"@types/tape":"^4.0.0",
38+
"@types/node":"^18.0.0",
3939
"c8":"^7.0.0",
4040
"prettier":"^2.0.0",
4141
"remark-cli":"^11.0.0",
4242
"remark-preset-wooorm":"^9.0.0",
43-
"tape":"^5.0.0",
4443
"type-coverage":"^2.0.0",
4544
"typescript":"^4.0.0",
4645
"xo":"^0.53.0"

‎test.js‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
1-
importtestfrom'tape'
1+
importassertfrom'node:assert/strict'
2+
importtestfrom'node:test'
23
import{whitespace}from'./index.js'
34

4-
test('whitespace',(t)=>{
5+
test('whitespace',()=>{
56
//@ts-expect-error: runtime.
6-
t.equal(whitespace(),false,'should return `false` without node')
7+
assert.equal(whitespace(),false,'should return `false` without node')
78

8-
t.equal(
9+
assert.equal(
910
whitespace({type:'element',tagName:'div'}),
1011
false,
1112
'should return `false` without text'
1213
)
1314

14-
t.equal(
15+
assert.equal(
1516
whitespace({type:'text',value:'\v'}),
1617
false,
1718
'should return `false` for other white-space'
1819
)
1920

20-
t.equal(
21+
assert.equal(
2122
whitespace({type:'text',value:' \t\r\n\f'}),
2223
true,
2324
'should return `true` for inter-element white-space'
2425
)
2526

26-
t.equal(
27+
assert.equal(
2728
whitespace({type:'text'}),
2829
true,
2930
'should return `true` for `text` without value'
3031
)
3132

32-
t.equal(
33+
assert.equal(
3334
whitespace(' \v'),
3435
false,
3536
'should return `false` for a `string` of text'
3637
)
3738

38-
t.equal(
39+
assert.equal(
3940
whitespace(' \t\r\n\f'),
4041
true,
4142
'should return `true` for a `string` of inter-element white-space'
4243
)
43-
44-
t.end()
4544
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp