Skip to content

Commit

Permalink
test: add basic e2e build case
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Oct 13, 2022
1 parent 7c479f2 commit 1fe77c5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/normal/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
代码块 demo

```jsx
import react from 'React';
import react from 'react';

export default () => <>Hello first code block demo!</>;
```
Expand Down
3 changes: 3 additions & 0 deletions examples/normal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
},
"dependencies": {
"react": "^18.2.0"
},
"devDependencies": {
"typescript": "~4.7.4"
}
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions tests/build.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import path from 'path';
import { execa } from 'umi/plugin-utils';

test('build', () => {
const bin = require.resolve('../bin/dumi');

execa.execaSync('node', [bin, 'build'], {
cwd: path.join(__dirname, '../examples/normal'),
});
});

0 comments on commit 1fe77c5

Please sign in to comment.