Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/rsbuild-plugin/src/__tests__/hooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ interface TransformContext {
resourcePath: string
environment: Environment
addDependency: (path: string) => void
addMissingDependency: (path: string) => void
}

type Transform = (context: TransformContext) => unknown
Expand Down Expand Up @@ -173,6 +174,7 @@ async function extract(
resourcePath: join(root, 'src', 'App.tsx'),
environment,
addDependency: () => {},
addMissingDependency: () => {},
})
}

Expand Down Expand Up @@ -249,6 +251,7 @@ describe('CSS revisions', () => {
resourcePath: path,
environment: web,
addDependency: () => {},
addMissingDependency: () => {},
}),
)
expect(serve()).toContain(`.${first}{color:red}`)
Expand Down Expand Up @@ -282,12 +285,14 @@ describe('CSS revisions', () => {
resourcePath: path,
environment: web,
addDependency: () => {},
addMissingDependency: () => {},
})
hooks.css({
code: '',
resourcePath: path,
environment: node,
addDependency: () => {},
addMissingDependency: () => {},
})
// Only the web build has seen the sheet change since it served it
await extract(hooks, app('tan'))
Expand All @@ -296,6 +301,7 @@ describe('CSS revisions', () => {
resourcePath: path,
environment: node,
addDependency: () => {},
addMissingDependency: () => {},
})

const passes = builds.map((build) => {
Expand Down
1 change: 1 addition & 0 deletions packages/webpack-plugin/src/__tests__/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ describe('devupUIWebpackPlugin', () => {
})
expect(loadDevupConfigSyncSpy).toHaveBeenCalledWith(
join(context, 'devup.json'),
expect.any(Set),
)
})

Expand Down
Loading