Skip to content
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

TypeError: Cannot read property 'addExpectationResult' of undefined at Env.fail #447

Open
neelay opened this issue Mar 6, 2018 · 1 comment

Comments

@neelay
Copy link

neelay commented Mar 6, 2018

I have a simple login frisby testcase. this is one of the examples, i am running this in jenkins, randomly on or the other test case fails with error below.

       it('##EWA_314: Login with registered non admin user and should return correct response', 
        function (done) {
         frisby
            .post(loginEndpoint, data.non_admin_login_payload)
            .expect('status', 200)
           // .expect('json', data.non_admin_response)
            .expect('json','user.name',data.non_admin_response.user.name)
            .expect('json','user.orgConfig.showSettings','true')
            .done(done);

        });

TypeError: Cannot read property 'addExpectationResult' of undefined at Env.fail (/var/lib/jenkins/workspace/qa_api_testing/api_testing/node_modules/jest-jasmine2/build/jasmine/Env.js:522:24) at fail (/var/lib/jenkins/workspace/qa_api_testing/api_testing/node_modules/jest-jasmine2/build/jasmine/jasmine_light.js:116:23) at /var/lib/jenkins/workspace/qa_api_testing/api_testing/tests/login_registration/test_register.js:88:11 at _fetch._fetch.catch.err (/var/lib/jenkins/workspace/qa_api_testing/api_testing/node_modules/frisby/src/frisby/spec.js:242:57) at at process._tickCallback (internal/process/next_tick.js:188:7)

@H1Gdev
Copy link
Collaborator

H1Gdev commented Mar 18, 2018

@neelay

Please adjust Jasmine timeout in either way.(default: 5[ms])

  • set jasmine.DEFAULT_TIMEOUT_INTERVAL.
  • set 3rd argument in it().

https://jasmine.github.io/api/2.6/global.html#it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants