Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aelbore/aria-vue
Testing tools for Vue components
https://github.com/aelbore/aria-vue
chai mocha rollup unit-test vite vue vue-test-utils
Last synced: 4 months ago
JSON representation
Testing tools for Vue components
- Host: GitHub
- URL: https://github.com/aelbore/aria-vue
- Owner: aelbore
- Archived: true
- Created: 2019-06-04T13:17:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T18:13:22.000Z (over 2 years ago)
- Last Synced: 2024-09-23T23:09:43.699Z (4 months ago)
- Topics: chai, mocha, rollup, unit-test, vite, vue, vue-test-utils
- Language: TypeScript
- Homepage:
- Size: 444 KB
- Stars: 22
- Watchers: 1
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-vue-3 - aria-vue - Headless testing with Vite + Vue + Vue-Testting-Utils (Tools)
README
[![npm version](https://badge.fury.io/js/aria-vue.svg)](https://www.npmjs.com/package/aria-vue)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)# aria-vue
Simple testing tools for vuejs# Note:
If you are using Vite 2.x, Please check https://github.com/aelbore/vite-plugin-testInstallation
------------
```
npm install --save-dev aria-vue aria-mocha puppeteer
```Example Code
------------
* `npm install`
* `npm run build`
* `cd example`
* `npm test`Usage
------------
```
aria-vue --helpUsage
$ aria-vue [options]Options
-p, --port port to use default(3000)
-d, --dir root directory of test files (default test)
-w --watch enable watch (default false)
-H --headless run test(s) in headless (default false)
--script scripts or helper scripts to load before setup
--path virtual path for your html reporter
--html path of your index.html file
-v, --version Displays current version
-h, --help Displays this messageExamples
$ aria-vue -w -H --script ./test/plugin.js
$ aria-vue --watch --path my-virtual-path --script ./test/plugin.js
$ aria-vue --path test-ui --html ./test/index.html --script ./test/plugins.js
```Plugin usage
------------
* Create `vite.config.test.js` file
```javascript
import { createVueTestPlugin } from 'aria-vue'export default {
plugins: [
createVueTestPlugin({
script: './test/plugins.js',
watch: true
})
]
}
```
* `vite --config vite.config.test.js`