Questions tagged [gulp-jest]

gulp-jest is a gulp plugin for running tests using Jest library.

gulp-jest is a gulp plugin for running tests using Jest library.

11 questions
9
votes
1 answer

Jest can not deal with insertAdjacentElement?

I want to test a quite simple JS function export function displaySpinner() { const loadingOverlayDOM = document.createElement('DIV'); const spinner = document.createElement('IMG'); loadingOverlayDOM.id =…
RSeidelsohn
  • 1,149
  • 18
  • 33
6
votes
1 answer

Run single test with jest.runCLI()

I want to use jest.runCLI() in gulp for executing only a changed test. How can I do this? How can I run just one test with jest.runCLI()?
Alex Chuev
  • 693
  • 5
  • 17
4
votes
2 answers

Why "gulp-jest" is failing with: "Please run node with the --harmony flag!"?

I get the following error when running gulp test: Error: Please run node with the --harmony flag! Here is my gulp task: var jest = require('gulp-jest'); gulp.task('test', function() { return gulp.src('src/**/__tests__').pipe(jest({ rootDir:…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
3
votes
1 answer

Cannot read property 'runCLI' of undefined in gulp-jest

I am trying to run jest tests with gulp using gulp-jest. Installed these packages from npm: "gulp-jest": "^4.0.3", "jest-cli": "^25.3.0" and provided the following configuration to jest: "jest": { "setupFilesAfterEnv": [ …
3
votes
1 answer

How to generate a report file using facebook Jest

Im using Jest to run unit tests on my application. Is there a way I can get it to generate any sort of report file? I would like to integrate the report with Bamboo.
jennas
  • 2,444
  • 2
  • 25
  • 31
2
votes
1 answer

Jest reference not found when running JS test using Chutzpah

I want to integrate my Jest unit tests to TFS CI, so that during build it shows the Jest unit Test results in Build output of TFS. I used a extension Chutzpah. Below are references for it…
piu
  • 195
  • 1
  • 2
  • 10
1
vote
0 answers

Modal Button testing in ReactJS using Jest

Hello I am trying to write automation testing for my ReactJS project. my LoginModal.js is here var React =require('react'); var ReactBootstrap= require('react-bootstrap/lib'); var Modal= ReactBootstrap.Modal; var LoginModal=…
Ajay Kumar
  • 309
  • 4
  • 19
0
votes
0 answers

Cannot ready property Calls of undefined

In the above code block dispatcher is required and after register the mock function is giving as undefined. describe('testStore', () => { // runs before each Test case. beforeEach( () => { dispatcher =…
Devdutta Natu
  • 171
  • 1
  • 7
0
votes
1 answer

gulp-jest doesn't apply config (moduleNameMapper to be specific)

I'm trying to test React component which has imported SASS with jest using gulp task. The issue here is that gulp-jest doesn't map module names (so it can't skip .scss files) and test fails (throws: "SyntaxError: Unexpected token *"). I have no idea…
0
votes
1 answer

Jest test cases are not failing as well not passing

My Package.json code: "dependencies": { "gulp-jest": "^2.0.0", "jest-cli": "^20.0.4", "supertest": "^1.2.0" } "scripts": { "test": "gulp test" } my gulpfile test tasks are as gulp.task('run-tests', (done) => { …
Nikita S
  • 139
  • 2
  • 11
0
votes
1 answer

How do I use grunt-run to run a npm script?

How do I run my 'test' npm script using Grunt? It says here that I can do it using grunt-run. package.json . . "scripts": { "test": "jest" }, "jest": { "preset": "jest-exponent" } . . . "devDependencies": { "babel-jest": "^17.0.0", …
Sam Henderson
  • 479
  • 5
  • 7