Skip to content

Commit

Permalink
build: clean build script, restrict hoist of pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Jan 15, 2024
1 parent 28f647e commit 44f7934
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 120 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ pnpm run --filter @rsbuild/some-package test

In addition to the unit tests, the Rsbuild also includes end-to-end (E2E) tests, which checks the functionality of the application as a whole.

You can run the `test:e2e` command to run the E2E tests:
You can run the `e2e` command to run the E2E tests:

```sh
pnpm run test:e2e
pnpm run e2e
```

If you need to run a specified test, you can add keywords to filter:

```sh
# Only run test cases with the copy-assets keyword
npx jest copy-assets
# Only run test cases which contains `vue` keyword with webpack
pnpm --filter @rsbuild/e2e test:webpack -g vue
```

---
Expand Down
3 changes: 3 additions & 0 deletions packages/plugin-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"@scripts/test-helper": "workspace:*",
"@types/node": "16.x",
"svelte": "^4.2.2",
"less": "^4.2.0",
"sass": "^1.69.5",
"stylus": "^0.55.0",
"typescript": "^5.3.0"
},
"publishConfig": {
Expand Down
5 changes: 5 additions & 0 deletions packages/plugin-svelte/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { type Transformer, pluginSvelte } from '../src';
describe('plugin-svelte', () => {
it('should add svelte loader properly', async () => {
const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {},
plugins: [pluginSvelte()],
});
Expand All @@ -16,6 +17,7 @@ describe('plugin-svelte', () => {
process.env.NODE_ENV = 'production';

const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {},
plugins: [pluginSvelte()],
});
Expand All @@ -26,6 +28,7 @@ describe('plugin-svelte', () => {

it('should turn off hmr by hand correctly', async () => {
const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {
dev: {
hmr: false,
Expand All @@ -40,6 +43,7 @@ describe('plugin-svelte', () => {

it('should override default svelte-loader options throw options.svelteLoaderOptions', async () => {
const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {},
plugins: [
pluginSvelte({
Expand All @@ -56,6 +60,7 @@ describe('plugin-svelte', () => {

it('should support pass custom preprocess options', async () => {
const rsbuild = await createStubRsbuild({
cwd: __dirname,
rsbuildConfig: {},
plugins: [
pluginSvelte({
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@rsbuild/core": "workspace:*",
"@scripts/test-helper": "workspace:*",
"typescript": "^5.3.0",
"vue": "^3.3.4",
"webpack": "^5.89.0"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 44f7934

Please sign in to comment.