diff --git a/azure-pipelines.yml b/.github/azure-pipelines.yml similarity index 100% rename from azure-pipelines.yml rename to .github/azure-pipelines.yml diff --git a/.github/workflows/yarn.js.yml b/.github/workflows/unit-test.yml similarity index 94% rename from .github/workflows/yarn.js.yml rename to .github/workflows/unit-test.yml index bc4991c415..52795f7ac2 100644 --- a/.github/workflows/yarn.js.yml +++ b/.github/workflows/unit-test.yml @@ -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 diff --git a/packages/element-plus/__tests__/ssr.spec.ts b/packages/element-plus/__tests__/ssr.spec.ts new file mode 100644 index 0000000000..de059a7f8c --- /dev/null +++ b/packages/element-plus/__tests__/ssr.spec.ts @@ -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') + }) +}) diff --git a/scripts/build.sh b/scripts/build.sh index 1956c7334d..9fa16451ce 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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