5
votes
Accepted
Is there a way to run a subset of tests using Jest?
In true javascript style , the support for this is delayed because of switch to another underlying library , in this case jasmine.
There is a -t option here (or --testNamePattern ) which takes a ...
4
votes
Rerun failed (flaky) tests with Jest
We recently switched from mocha to jest and in the process came across a flake which appears to due to a bug in react. Given the difficulty we had in investigating this issue and that it should be ...
2
votes
Typescript function not waiting for the waitForExist() and printing the next line
WaitForExit() checks only for the presence of and not the visibility. You could use $(selector).waitForDisplayed instead. And also ensure there is no other element with the same selector.
1
vote
validated variable is present and datatype assertion using Jest testing
Your admin.js is :
const mongoose = require("mongoose");
let Schema = mongoose.Schema;
Schema = new Schema({
User: { type: String, unique: true },
Pass: { type: String },
});
var ...
1
vote
Accessibility testing at the unit level
The best approach I have used is to write unit tests for my accessibility requirements along with all other unit tests. I always insist on more accessibility features than WCAG does, and far more than ...
1
vote
How to re-run jest failed test suite
The jest command gives an exit code 1 if a test failed, 0 if all tests succeeded.
You could create a bash shell script that looks something like this:
#!/bin/bash
jest
if [ $? -eq 0 ]
then
echo &...
1
vote
Testing nodejs gRPC client functions
There is no sync alternative i could find for that method, so you could validate everything inside the callback itself or wrap it with a promise:
let authenticateSync = function (request, meta) {...
1
vote
How to wait till next page opens after a button click in Jest + TypeScript?
I could found a solution.
login_page.ts
driver: ThenableWebDriver;
findWelcomeMessageField(){
return this.driver.wait(until.elementLocated(By.id('welcome')), 2000);
}
public async ...
1
vote
Accepted
Wait for element change not present (WebDriver/JavaScript/Jest)
I have created my own isNotPresent wait-until method which uses a locator so you can check if an element with a certain class is not present anymore. This loops over the locator either until the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
jestjs × 10javascript × 4
automated-testing × 3
selenium-webdriver × 2
unit-tests × 2
nodejs × 2
typescript × 2
reactjs × 2
angular × 1
jasmine × 1
mock × 1
webdriver.io × 1
flaky × 1
accessibility × 1