sindresorhus on main
Minor tweaks (compare)
sindresorhus on master
sindresorhus on main
sindresorhus on master
Move to GitHub Actions (#16) (compare)
hm...
so...
given i have 2 test files with 2 tests in each...
and each test contains async function with implementation
and this implementation is synchronous code, like 3 serial actions
when executing with ava
then there will be two process created for each test file
and instide each process two tests will be triggered concurrently
BUT real actions from both tests among same file will not be executed concurrently. First node will execute one series for 3 actions from one test, then another series of 3 actions from another test from the same file...
AND in parallel - the same will happen concurrently for another test file...
right? :)
I am actually considering using ava for browser tests, based on selenium webdriver.
All my tests, including tests in the same file are independent. Each test in the same file will open it's own browser and execute a series of actions in it. Then close the browser in the end. So I want to run these concurrently. The problem I have with current test runner is that I can parallelize only files, not tests in the same file. All code from the tests in the same file will be executed sequentially...
question is whether with AVA it will be the same...
I did with those args
"args": [
"--ext",
"ts",
"--require",
"ts-node/register",
"${file}"
],
but it doesn't work
"scripts": {
"test": "tsc && ava",
"test:serial": "node ./node_modules/.bin/tsc && node --inspect-brk=5858 ./node_modules/.bin/ava --serial",
"test:watch": "tsc && ava --watch"
},
{
"type": "node",
"request": "launch",
"name": "Run AVA tests",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"test:serial"
],
"port": 5858,
"stopOnEntry": true,
"sourceMaps": true,
"cwd": "${workspaceFolder}/my/subdirectory"
}
outputCapture
to std
if I use the --inspect-brk
flag
Hi,
I there, I fear I ask an often asked question. Yet I did not find an answer. Did someone of you manage getting AvaJS running with Angular 8? If not, does someone know the main problems to come up with a proper configuration? Thanks in advance.
PS: Please find attached the sources I read so far
.serial
?
package.json
"scripts": {
"start": "node index.js",
"test": "ava",
"test-watch": "ava --watch"
},
"ava": {
"sources": [
"src/**/*"
],
"files": [
"tests/**/*"
]
},
sources
from your config? I'm not certain about the semantics within AVA's internals, but I think the problem might be that you are overriding the default glob patterns for which files to watch, rather than adding to them. Since your test files are not listed in sources
, that would mean changes to your tests do not cause the tests to be re-run. But the default does include the test files, so deleting sources
should fix it.
import {serial as test} from 'ava';
? The intent is for this one test file to act as though it were run with ava -s
. I do use test.before
and test.after.always
in this specific test file.
class Device {
id: string;
path: string;
files: Array<DeviceFile>;
treatmentsCount: number;
get isEmpty(): boolean {
return this.files.length === 0;
}
}
export default Device;