Skip to content

Commit

Permalink
call csv2md with node
Browse files Browse the repository at this point in the history
  • Loading branch information
pstaender committed Apr 21, 2024
1 parent 949fdfc commit 2c5a79b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 3 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -34,8 +34,8 @@
},
"devDependencies": {
"@types/chai": "^4.2.11",
"@types/jest": "^26.0.5",
"@types/mocha": "^8.0.0",
"@types/jest": "^26.0.24",
"@types/mocha": "^8.2.3",
"@types/node": "^14.0.23",
"@types/yargs": "^15.0.5",
"chai": "^5",
Expand Down
6 changes: 3 additions & 3 deletions test/test.ts
Expand Up @@ -117,17 +117,17 @@ describe('markdown table output', () => {
})
it('expect to execute bin/csv2md', () => {
const md = require('child_process').execSync(
`${__dirname}/../bin/csv2md --pretty ${__dirname}/example1.csv`
`node ${__dirname}/../bin/csv2md --pretty ${__dirname}/example1.csv`
)
expect(md.toString().trim()).to.be.equal(expectedMarkdownTablePretty.trim())
})
it('expect to stream with bin/csv2md', () => {
let md = require('child_process').execSync(
`${__dirname}/../bin/csv2md --pretty < ${__dirname}/example1.csv`
`node ${__dirname}/../bin/csv2md --pretty < ${__dirname}/example1.csv`
)
expect(md.toString().trim()).to.be.equal(expectedMarkdownTablePretty.trim())
md = require('child_process').execSync(
`${__dirname}/../bin/csv2md < ${__dirname}/example1.csv`
`node ${__dirname}/../bin/csv2md < ${__dirname}/example1.csv`
)
expect(md.toString().trim()).to.be.equal(expectedMarkdownTableInline.trim())
})
Expand Down

0 comments on commit 2c5a79b

Please sign in to comment.