velesin / jasmine-jquery

jQuery matchers and fixture loader for Jasmine framework
MIT License
1.89k stars 347 forks source link

Ajax Issue with jQuery 1.3.2 #277

Open erichulburd opened 8 years ago

erichulburd commented 8 years ago

When loading jasmine-jquery after loading my platform's jquery version (1.3.2), I get the following error:

  Uncaught TypeError: $.ajax(...).fail is not a function
  at /home/eric/Code/tmac-internal/node_modules/jasmine-jquery/lib/jasmine-jquery.js:138

I'm loading the test with Karma:

module.exports = function(config) {
  config.set({

    // base path that will be used to resolve all patterns (eg. files, exclude)
    basePath: './',

    // frameworks to use
    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
    frameworks: ['jasmine', 'requirejs'],

    // list of files / patterns to load in the browser
    files: [
      {pattern: './public/javascripts/jquery-1.3.2.js', included: true},
      {pattern: './public/javascripts/application.js', included: true},
      './test/javascripts/test-main.js',
      {pattern: './test/javascripts/**/*.test.js', included: false}
    ],

  ...

And in my package.json:

  "devDependencies": {
    "karma": "^0.13.19",
    "karma-chrome-launcher": "^0.2.2",
    "karma-firefox-launcher": "^0.1.7",
    "karma-safari-launcher": "^0.1.1",
    "karma-ie-launcher": "^0.2.0",
    "karma-jasmine": "^0.3.6",
    "jasmine-core": "2.4.1",
    "jasmine-jquery": "2.1.1"
  }

I've seen other references to people using jQuery 1.3.2 with this package. Am I missing something or is this a dealbreaker?