-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jasmine is not defined error coming up when we try to run script #8
Comments
I have the same problem. Any solution to it? |
Don't faced with such error yet. Btw, here is demo project with jest-alure integration https://github.com/zaqqaz/visual-unit-tests/blob/master/src/setupTests.ts just clone it and try it yourself. |
Show your version of jest @vjuturu. |
resolved in #15 |
Versions jest.config.js
I have tests, those are the results if i remove setupFilesAfterEnv from jest config file
|
@kevinoliveira can you attach the source of src/home/example.test.ts? |
src/home/example.ts
src/home/example.test.ts
|
I am also getting error:
...
setupFilesAfterEnv: ['jest-allure/dist/setup'],
reporters: [
'default',
'jest-github-reporter',
...
...
"devDependencies": {
"jasmine": "^3.5.0",
"jest-allure": "^0.1.1",
...
}
import { wait } from '../src/wait';
import process from 'process';
import cp from 'child_process';
import path from 'path';
test('throws invalid number', async () => {
const input = parseInt('foo', 10);
await expect(wait(input)).rejects.toThrow('milliseconds not a number');
});
test('wait 500 ms', async () => {
const start = new Date();
await wait(500);
const end = new Date();
const delta = Math.abs(end.getTime() - start.getTime());
expect(delta).toBeGreaterThan(450);
});
// shows how the runner will run a javascript action with env / stdout protocol
test('test runs', () => {
process.env['INPUT_MILLISECONDS'] = '500';
const ip = path.join(__dirname, '..', 'lib', 'main.js');
const options: cp.ExecSyncOptions = {
env: process.env,
};
console.log(cp.execSync(`node ${ip}`, options).toString());
}); EDIT: Looks like it's because of EDIT2: @kevinoliveira Looks like I'm actually having the same problem (which is I think different that this one) over in #43. |
@kevinoliveira Hello, I have the same issue as you had, I am curious if you solved it? |
Hi, I had the same situation and found no one answer wich worked for me. it's resolve issue with and report generate successed |
Awesome news, I will take a look on the next few days! |
Yep, that's the correct solution. |
Thanks! It works for me |
Hi! I was able to fix the issue using:
into the jest config file:
|
I'm using Jest 27 and Instead I added this to my package.json and worked:
|
I have Jest 29, adding, I tried several solutions, still does not work |
@saritvakrat Try to install this package: |
ReferenceError: jasmine is not defined
at registerAllureReporter (/Users/xxxx/Projects/xxxx/xxxx/node_modules/jest-allure/dist/setup.js:46:5)
Steps followed:
please advise.
Thanks
--vj
The text was updated successfully, but these errors were encountered: