Skip to content

Commit 1fe77c5

Browse files
committed
test: add basic e2e build case
1 parent 7c479f2 commit 1fe77c5

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

examples/normal/docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
代码块 demo
44

55
```jsx
6-
import react from 'React';
6+
import react from 'react';
77

88
export default () => <>Hello first code block demo!</>;
99
```

examples/normal/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
},
88
"dependencies": {
99
"react": "^18.2.0"
10+
},
11+
"devDependencies": {
12+
"typescript": "~4.7.4"
1013
}
1114
}

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/build.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import path from 'path';
2+
import { execa } from 'umi/plugin-utils';
3+
4+
test('build', () => {
5+
const bin = require.resolve('../bin/dumi');
6+
7+
execa.execaSync('node', [bin, 'build'], {
8+
cwd: path.join(__dirname, '../examples/normal'),
9+
});
10+
});

0 commit comments

Comments
 (0)