This commit is contained in:
parent
9b491b824f
commit
dd877aad7c
|
@ -21,3 +21,7 @@ data/themes/gadjo/static/css/agent-portal.css.map
|
||||||
.cache
|
.cache
|
||||||
.coverage
|
.coverage
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
|
node_modules/
|
||||||
|
coverage/
|
||||||
|
package.json
|
||||||
|
package-lock.json
|
||||||
|
|
|
@ -15,7 +15,7 @@ pipeline {
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
utils = new Utils()
|
utils = new Utils()
|
||||||
utils.publish_coverage('coverage.xml')
|
utils.publish_coverage('coverage.xml,coverage/cobertura-coverage.xml')
|
||||||
utils.publish_coverage_native('index.html')
|
utils.publish_coverage_native('index.html')
|
||||||
utils.publish_pylint('pylint.out')
|
utils.publish_pylint('pylint.out')
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pip install $*
|
||||||
|
nodeenv --prebuilt --python-virtualenv
|
||||||
|
source $VIRTUAL_ENV/bin/activate # source again to activate npm from env
|
||||||
|
npm install vite vitest happy-dom @vitest/coverage-v8
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { expect, test, vi} from 'vitest'
|
||||||
|
|
||||||
|
test('dummy test', async () => {
|
||||||
|
expect(true).toBe(true)
|
||||||
|
})
|
12
tox.ini
12
tox.ini
|
@ -1,6 +1,6 @@
|
||||||
[tox]
|
[tox]
|
||||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/combo/{env:BRANCH_NAME:}
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/combo/{env:BRANCH_NAME:}
|
||||||
envlist = coverage-py3-django32-codestyle, pylint
|
envlist = coverage-py3-django32-codestyle, pylint, vitest
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
|
@ -81,3 +81,13 @@ allowlist_externals =
|
||||||
commands =
|
commands =
|
||||||
./getlasso3.sh
|
./getlasso3.sh
|
||||||
./pylint.sh combo/ tests/
|
./pylint.sh combo/ tests/
|
||||||
|
|
||||||
|
[testenv:vitest]
|
||||||
|
deps = nodeenv
|
||||||
|
allowlist_externals =
|
||||||
|
bash
|
||||||
|
npx
|
||||||
|
install_command = bash setup-vitest.sh {packages}
|
||||||
|
setenv =
|
||||||
|
NODE_PATH={envdir}/lib/node_modules
|
||||||
|
commands = npx vitest --run --coverage
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
import { defineConfig } from 'vitest/config'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
include: 'tests/js/**/*.test.js',
|
||||||
|
watchExclude: ['**'],
|
||||||
|
coverage: {
|
||||||
|
include: ['combo/**/*.js'],
|
||||||
|
all: true,
|
||||||
|
reporter: ['cobertura', 'html'],
|
||||||
|
},
|
||||||
|
environment: 'happy-dom'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue