Skip to content

Commit

Permalink
chore(test): update esm test to verify correct behavior
Browse files Browse the repository at this point in the history
Previously, it was verifying *incorrect* behavior.
  • Loading branch information
isaacs committed May 1, 2023
1 parent 831401f commit a7db817
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -19,7 +19,7 @@
"fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'",
"pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs",
"test": "c8 mocha ./test/*.cjs",
"test:esm": "c8 mocha ./test/esm/cliui-test.mjs",
"test:esm": "c8 mocha ./test/**/*.mjs",
"postest": "check",
"coverage": "c8 report --check-coverage",
"precompile": "rimraf build",
Expand Down
11 changes: 6 additions & 5 deletions test/esm/cliui-test.mjs
Expand Up @@ -35,13 +35,14 @@ describe('ESM', () => {
// TODO: we should flesh out the Deno and ESM implementation
// such that it spreads words out over multiple columns appropriately:
const expected = [
'i am a string ti am a seconi am a third',
'hat should be wd string tha string that',
'rapped t should be should be w',
' wrapped rapped'
'i am a string i am a i am a third',
'that should be second string that',
'wrapped string that should be',
' should be wrapped',
' wrapped',
]
ui.toString().split('\n').forEach((line, i) => {
strictEqual(line, expected[i])
})
})
})
})

0 comments on commit a7db817

Please sign in to comment.