test: add ssr test (#1261)

* test: add ssr test

* chore: update
This commit is contained in:
zazzaz 2021-01-12 11:00:37 +08:00 committed by GitHub
parent 6530cdbeba
commit f2b20c8eb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 4 deletions

View File

@ -1,10 +1,10 @@
name: CI
name: Unit Test
on: pull_request
jobs:
build:
name: Test
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

View File

@ -0,0 +1,15 @@
/**
* @jest-environment node
*/
describe('SSR', () => {
test('require', () => {
try {
process.env.VUE_ENV = 'server'
require('../index')
} catch (e) {
throw Error(e)
}
expect('pass').toBe('pass')
})
})

View File

@ -6,8 +6,6 @@
# *utils, __mocks__ directives hooks locale theme*
# which means the result will not contain folder name includes utils
yarn bootstrap
yarn clean:lib
yarn build:esm-bundle
tar --exclude=index.esm.js -zcvf ./es.gz ./lib