diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index db5fd2b..9a38b57 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,3 +22,7 @@ jobs: - run: npm ci - run: npm run build - run: npm test + - working-directory: examples + run: npm run build + - working-directory: examples + run: npm test diff --git a/examples/package.json b/examples/package.json index 6a0b439..1ccc09f 100644 --- a/examples/package.json +++ b/examples/package.json @@ -5,6 +5,7 @@ "license": "ISC", "private": true, "scripts": { - "build": "../node_modules/.bin/rollup -c" + "build": "../node_modules/.bin/rollup -c", + "test": "sh test.sh" } } diff --git a/examples/test.sh b/examples/test.sh new file mode 100755 index 0000000..6b15058 --- /dev/null +++ b/examples/test.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +node dist/factory.js | grep -q "factory { one: 'one', other: 'other' }" && echo "factory ok" || (echo "factory failed" && false) +node dist/ponyfill.js | grep -q "ponyfill { one: 'one', othe: 'other' }" && echo "ponyfill ok" || (echo "ponyfill failed" && false) +node dist/polyfill.js | grep -q "{ one: 'one', other: 'other' }" && echo "polyfill ok" || (echo "polyfill failed" && false)