File tree 3 files changed +22
-34
lines changed
3 files changed +22
-34
lines changed Original file line number Diff line number Diff line change 7
7
name : ${{matrix.node}}
8
8
runs-on : ubuntu-latest
9
9
steps :
10
- - uses : actions/checkout@v2
11
- - uses : dcodeIO /setup-node-nvm@master
10
+ - uses : actions/checkout@v3
11
+ - uses : actions /setup-node@v3
12
12
with :
13
13
node-version : ${{matrix.node}}
14
14
- run : npm install
15
15
- run : npm test
16
- - uses : codecov/codecov-action@v1
16
+ - uses : codecov/codecov-action@v3
17
17
strategy :
18
18
matrix :
19
19
node :
20
- - lts/erbium
20
+ - lts/hydrogen
21
21
- node
Original file line number Diff line number Diff line change 33
33
" index.js"
34
34
],
35
35
"devDependencies" : {
36
- "@types/tape " : " ^4 .0.0" ,
36
+ "@types/node " : " ^18 .0.0" ,
37
37
"c8" : " ^7.0.0" ,
38
38
"concat-stream" : " ^2.0.0" ,
39
39
"hast-util-select" : " ^5.0.0" ,
42
42
"rehype-parse" : " ^8.0.0" ,
43
43
"remark-cli" : " ^11.0.0" ,
44
44
"remark-preset-wooorm" : " ^9.0.0" ,
45
- "tape" : " ^5.0.0" ,
46
45
"type-coverage" : " ^2.0.0" ,
47
46
"typescript" : " ^4.0.0" ,
48
47
"unified" : " ^10.0.0" ,
Original file line number Diff line number Diff line change 1
- import test from 'tape'
1
+ import assert from 'node:assert/strict'
2
+ import test from 'node:test'
2
3
import { unM49 } from './index.js'
3
4
4
- test ( 'm49' , function ( t ) {
5
- t . plan ( 3 )
5
+ test ( 'm49' , function ( ) {
6
+ assert . ok ( Array . isArray ( unM49 ) , 'should be an `array`' )
6
7
7
- t . ok ( Array . isArray ( unM49 ) , 'should be an `array`' )
8
-
9
- let index = - 1
10
- let found = false
11
-
12
- while ( ++ index < unM49 . length ) {
13
- if ( unM49 [ index ] . code !== '826' ) {
14
- continue
15
- }
16
-
17
- found = true
18
- t . deepEqual (
19
- unM49 [ index ] ,
20
- {
21
- type : 4 ,
22
- name : 'United Kingdom of Great Britain and Northern Ireland' ,
23
- code : '826' ,
24
- iso3166 : 'GBR' ,
25
- parent : '154'
26
- } ,
27
- 'should work'
28
- )
29
- }
30
-
31
- t . equal ( found , true , 'expected `826` in array' )
8
+ const gbr = unM49 . find ( ( d ) => d . code === '826' )
9
+ assert ( gbr )
10
+ assert . deepEqual (
11
+ gbr ,
12
+ {
13
+ type : 4 ,
14
+ name : 'United Kingdom of Great Britain and Northern Ireland' ,
15
+ code : '826' ,
16
+ iso3166 : 'GBR' ,
17
+ parent : '154'
18
+ } ,
19
+ 'should work'
20
+ )
32
21
} )
You can’t perform that action at this time.
0 commit comments