Skip to content

Hoist jsonSrc to top of stripJsonComments.test.js #48

Hoist jsonSrc to top of stripJsonComments.test.js

Hoist jsonSrc to top of stripJsonComments.test.js #48

GitHub Actions / Test Results succeeded Jan 15, 2024 in 1s

Test Results ✅

Tests passed successfully

✅ TESTS-TestSuites.xml

41 tests were completed in 1s with 41 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
test/analyzeArgv.test.js 9✅ 18ms
test/findFile.test.js 3✅ 6ms
test/getPath.test.js 4✅ 6ms
test/main.test.js 4✅ 544ms
test/runJsdoc.test.js 6✅ 348ms
test/stripJsonComments.test.js 15✅ 16ms

✅ test/analyzeArgv.test.js

✅ analyzeArgv > empty argv returns defaults
✅ analyzeArgv > destination not set if flag not followed by valid arg
✅ analyzeArgv > -d or --destination sets destination
✅ analyzeArgv > last -d wins
✅ analyzeArgv > -h, --help, -v, or --version sets willGenerate to false
✅ analyzeArgv > -c or --configure sets destination if opts defined
✅ analyzeArgv > last -c with opts defined wins
✅ analyzeArgv > -c with opts.destination undefined resets destination
✅ analyzeArgv > -d overrides -c

✅ test/findFile.test.js

✅ findFile > find file at root of tree
✅ findFile > find files using breadth-first search
✅ findFile > rejects when file not found

✅ test/getPath.test.js

✅ getPath > finds command on POSIX system
✅ getPath > finds command on Windows system
✅ getPath > rejects when command isn't found
✅ getPath > throws if no appropriate environment variable found

✅ test/main.test.js

✅ jsdoc-cli-wrapper > success without index.html path
✅ jsdoc-cli-wrapper > error without index.html path
✅ jsdoc-cli-wrapper > success with index.html path
✅ jsdoc-cli-wrapper > emit internal error

✅ test/runJsdoc.test.js

✅ runJsdoc > throws error if PATH/Path env var not found
✅ runJsdoc > emits error if jsdoc not found
✅ runJsdoc > returns success on -h, doesn't delete existing dir
✅ runJsdoc > deletes existing output and returns error
✅ runJsdoc > replaces existing output and returns success
✅ runJsdoc > deletes existing output and returns success

✅ test/stripJsonComments.test.js

✅ stripJsonComments > doesn't modify > the empty string
✅ stripJsonComments > doesn't modify > an object with plain strings and no comments
✅ stripJsonComments > doesn't modify > properly escaped strings
✅ stripJsonComments > doesn't modify > strings containing comment patterns
✅ stripJsonComments > doesn't modify > strings including trailing commas
✅ stripJsonComments > replaces > line comments, preserving existing whitespace
✅ stripJsonComments > replaces > block comments, preserving existing whitespace
✅ stripJsonComments > replaces > mixed comments and trailing commas before ] or }
✅ stripJsonComments > opens > a block comment if character after "*/" is '*'
✅ stripJsonComments > opens > a line comment if character after "*/" is '/'
✅ stripJsonComments > maintains correct syntax error position info when > * not preceded or followed by /
✅ stripJsonComments > maintains correct syntax error position info when > / not followed by /
✅ stripJsonComments > maintains correct syntax error position info when > multiple trailing commas are present
✅ stripJsonComments > maintains correct syntax error position info when > trailing commas don't follow an element or property
✅ stripJsonComments > maintains correct syntax error position info when > a string contains an escaped space before the closing quote