Skip to content

Commit

Permalink
Add smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
darekkay committed Mar 19, 2021
1 parent 094df3e commit 1422f8c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ package-lock.json
### App ###

/build
/test/temp
*.log
.DS_Store
2 changes: 1 addition & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const cli = (program, argv) => {
// report
program
.command("report <files...>")
.description("report bookmarks")
.description("display bookmarks report")
.option("-d, --no-duplicates", "do not check for duplicate bookmark URLs")
.action((args, options) => report.run({ args, options }))
.on("--help", () => {
Expand Down
File renamed without changes.
36 changes: 36 additions & 0 deletions test/smoke-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env bash

# This is a smoke test that executes different commands

# missing command
../bin/static-marks.js
echo "---"

# unknown command
../bin/static-marks.js unknown
echo "---"

# build: missing parameter
../bin/static-marks.js build
echo "---"

# build: -o parameter
../bin/static-marks.js build ../docs/examples/bookmarks/* -o temp/out.html
echo "---"

# build: redirect using '>'
../bin/static-marks.js build ../docs/examples/bookmarks/* > temp/redirect.html
echo "no output"
echo "---"

# report
../bin/static-marks.js report ../docs/examples/bookmarks/*
echo "---"

# report: with duplicates
../bin/static-marks.js report ./examples/maximal-example.yml
echo "---"

# report: ignore duplicates
../bin/static-marks.js report ./examples/maximal-example.yml -d
echo "---"

0 comments on commit 1422f8c

Please sign in to comment.