-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add e2e case for build API (#4081)
- Loading branch information
1 parent
a3c7b54
commit 440cdbf
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { createRsbuild } from '@rsbuild/core'; | ||
|
||
test('should allow to call `build` and get stats object', async () => { | ||
const rsbuild = await createRsbuild({ | ||
cwd: __dirname, | ||
}); | ||
|
||
const { stats, close } = await rsbuild.build(); | ||
|
||
await close(); | ||
|
||
const result = stats?.toJson({ all: true })!; | ||
|
||
expect(result.name).toBe('web'); | ||
expect(result.assets?.length).toBeGreaterThan(0); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log('hello'); |