jasmine-ajax icon indicating copy to clipboard operation
jasmine-ajax copied to clipboard

3.3.1 causes something to break

Open amandapouget opened this issue 8 years ago • 2 comments

We are using node.js and get this error if we bump to 3.3.1:

Message:
    ReferenceError: getJasmineRequireObj is not defined
  Stack:
    ReferenceError: getJasmineRequireObj is not defined
        at /Users/amanda/construction/node_modules/jasmine-ajax/lib/mock-ajax.js:43:41
        at Object.<anonymous> (/Users/amanda/construction/node_modules/jasmine-ajax/lib/mock-ajax.js:45:2)
        at Module._compile (module.js:413:34)
        at Module._extensions..js (module.js:422:10)
        at Object.require.extensions.(anonymous function) [as .js] (/Users/amanda/construction/node_modules/babel-register/lib/node.js:152:7)
        at Module.load (module.js:357:32)
        at Function.Module._load (module.js:314:12)
        at Module.require (module.js:367:17)
        at require (internal/module.js:16:19)

Works at 3.3.0... Suggestions?

amandapouget avatar Jan 16 '17 21:01 amandapouget

3.3.1 specifically rolled back some changes that caused browser-based CommonJS stuff to break. I would still like to be able to have Jasmine-Ajax run in:

  • Basic browser (non-CommonJS etc)
  • Browser with CommonJS
  • Node.js with some fake DOM/Browser stuff

But, I don't know what all needs to be done to make those work or even how we could go about setting up a test matrix on Travis that would be able to check all of these things. I would be happy to review pull requests to test and try to solve all of these things.

slackersoft avatar Feb 15 '17 23:02 slackersoft

Oh Gregg, if only it was indeed possible “to solve all of the things.” ;-)

On Feb 15, 2017, at 6:24 PM, Gregg Van Hove [email protected] wrote:

3.3.1 specifically rolled back some changes that caused browser-based CommonJS stuff to break. I would still like to be able to have Jasmine-Ajax run in:

Basic browser (non-CommonJS etc) Browser with CommonJS Node.js with some fake DOM/Browser stuff But, I don't know what all needs to be done to make those work or even how we could go about setting up a test matrix on Travis that would be able to check all of these things. I would be happy to review pull requests to test and try to solve all of these things.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jasmine/jasmine-ajax/issues/171#issuecomment-280174917, or mute the thread https://github.com/notifications/unsubscribe-auth/AMQpjJpIxAMWLFpyexTKzjaDADVD1sSeks5rc4k9gaJpZM4Lk-8n.

amandapouget avatar Feb 15 '17 23:02 amandapouget

I'm closing this due to prolonged lack of user interest.

We haven't seen any signs of interest in using Node to test code that calls XMLHttpRequest since 2018, and it appears to have been a fairly niche scenario even then. Anyone who's still in that situation and doesn't want to migrate to a more easily tested API like fetch can use jasmine-ajax 3.3.0.

sgravrock avatar Sep 23 '23 17:09 sgravrock