Skip to content

Commit

Permalink
Chore: SSR test (#16797)
Browse files Browse the repository at this point in the history
* init ssr test

* ssr test
  • Loading branch information
iamkun authored and island205 committed Oct 31, 2019
1 parent 05ca2d1 commit 42e74d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ then
# build
VERSION=$VERSION npm run dist

# ssr test
node test/ssr/require.test.js

# publish theme
echo "Releasing theme-chalk $VERSION ..."
cd packages/theme-chalk
Expand Down
10 changes: 10 additions & 0 deletions test/ssr/require.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const path = require('path');

try {
process.env.VUE_ENV = 'server';
require(path.join(process.env.PWD, './lib/index'));
console.log('SSR require test PASS');
} catch (e) {
console.error('SSR require test error');
throw Error(e);
}

0 comments on commit 42e74d1

Please sign in to comment.