Skip to content

Commit 8ee2fad

Browse files
committed
chore(test): update esm test to verify correct behavior
Previously, it was verifying *incorrect* behavior.
1 parent fafee28 commit 8ee2fad

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'",
2020
"pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs",
2121
"test": "c8 mocha ./test/*.cjs",
22-
"test:esm": "c8 mocha ./test/esm/cliui-test.mjs",
22+
"test:esm": "c8 mocha ./test/**/*.mjs",
2323
"postest": "check",
2424
"coverage": "c8 report --check-coverage",
2525
"precompile": "rimraf build",

test/esm/cliui-test.mjs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,14 @@ describe('ESM', () => {
3535
// TODO: we should flesh out the Deno and ESM implementation
3636
// such that it spreads words out over multiple columns appropriately:
3737
const expected = [
38-
'i am a string ti am a seconi am a third',
39-
'hat should be wd string tha string that',
40-
'rapped t should be should be w',
41-
' wrapped rapped'
38+
'i am a string i am a i am a third',
39+
'that should be second string that',
40+
'wrapped string that should be',
41+
' should be wrapped',
42+
' wrapped',
4243
]
4344
ui.toString().split('\n').forEach((line, i) => {
4445
strictEqual(line, expected[i])
4546
})
4647
})
47-
})
48+
})

0 commit comments

Comments
 (0)