Skip to content

Commit 1cb88e2

Browse files
committed
Sandbox fixture projects and builds in a temp working directory
1 parent dc74a2e commit 1cb88e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+597
-341
lines changed

packages/tests/README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ describe('My very awesome plugin', () => {
8282
We currently support `webpack4`, `webpack5`, `esbuild`, `rollup` and `vite`.<br/>
8383
So we need to ensure that our plugin works everywhere.
8484

85-
When you use `runBundlers()` in your setup (usually `beforeAll()`), it will run the build of [a very basic default mock project](/packages/tests/src/_jest/fixtures/main.js).<br/>
85+
When you use `runBundlers()` in your setup (usually `beforeAll()`), it will run the build of [a very basic default mock project](/packages/tests/src/_jest/fixtures/easy_project/main.js).<br/>
8686
Since it's building in a seeded directory, to avoid any collision, it will also return a cleanup function, that you'll need to use in your teardown (usually `afterAll()`).
8787

8888
During development, you may want to target a specific bundler, to reduce noise from the others.<br/>
@@ -124,7 +124,6 @@ It will return the array of entries it created.
124124
Here's how you'd go with it:
125125

126126
```typescript
127-
import { getWebpack4Entries } from '@dd/tests/_jest/helpers/xpackConfigs';
128127
import { generateProject } from '@dd/tests/_jest/helpers/generateMassiveProject';
129128
import { defaultPluginOptions } from '@dd/tests/_jest/helpers/mocks';
130129
import { runBundlers } from '@dd/tests/_jest/helpers/runBundlers';
@@ -145,11 +144,7 @@ describe('Some very massive project', () => {
145144
},
146145
// Mode production makes the build waaaaayyyyy too slow.
147146
webpack5: { mode: 'none', entry: entries },
148-
webpack4: {
149-
mode: 'none',
150-
// Webpack4 needs some help for pnp resolutions.
151-
entry: getWebpack4Entries(entries),
152-
},
147+
webpack4: { mode: 'none', entry: entries },
153148
};
154149

155150
cleanup = await runBundlers(defaultPluginOptions, bundlerOverrides);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
massiveProject
2+
yarn-error.log
3+
.yarn/*
4+
!.yarn/cache
5+
!.yarn/patches
6+
!.yarn/releases
7+
!.yarn/plugins
8+
!.vscode
9+
10+
node_modules/
11+
dist/

0 commit comments

Comments
 (0)