diff --git a/app/assets/javascripts/wizard/test/test_helper.js b/app/assets/javascripts/wizard/test/test_helper.js index f2281cea0e8..1d2ddbdb163 100644 --- a/app/assets/javascripts/wizard/test/test_helper.js +++ b/app/assets/javascripts/wizard/test/test_helper.js @@ -19,7 +19,7 @@ //= require locales/en //= require fake_xml_http_request //= require route-recognizer -//= require pretender +//= require pretender/pretender //= require ./wizard-pretender // Trick JSHint into allow document.write diff --git a/config/application.rb b/config/application.rb index 44599fa1651..90218a83eb1 100644 --- a/config/application.rb +++ b/config/application.rb @@ -92,6 +92,7 @@ module Discourse if Rails.env == "development" || Rails.env == "test" config.assets.paths << "#{config.root}/test/javascripts" config.assets.paths << "#{config.root}/test/stylesheets" + config.assets.paths << "#{config.root}/node_modules" end # Allows us to skip minifincation on some files diff --git a/package.json b/package.json index 0fc51ebb720..549ba135a2a 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "chrome-remote-interface": "^0.25.6", "eslint": "^4.19.1", "prettier": "^1.13.0", - "puppeteer": "^1.4.0" + "puppeteer": "^1.4.0", + "pretender": "^1.6" } } diff --git a/test/javascripts/test_helper.js b/test/javascripts/test_helper.js index c24d425fdd2..0e0f819935e 100644 --- a/test/javascripts/test_helper.js +++ b/test/javascripts/test_helper.js @@ -11,7 +11,7 @@ //= require ember-qunit //= require fake_xml_http_request //= require route-recognizer -//= require pretender +//= require pretender/pretender //= require discourse-loader //= require preload-store diff --git a/yarn.lock b/yarn.lock index d908e1a0967..098993b5d82 100644 --- a/yarn.lock +++ b/yarn.lock @@ -466,6 +466,10 @@ extract-zip@^1.6.5: mkdirp "0.5.0" yauzl "2.4.1" +fake-xml-http-request@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/fake-xml-http-request/-/fake-xml-http-request-1.6.0.tgz#bd0ac79ae3e2660098282048a12c730a6f64d550" + fast-deep-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" @@ -813,9 +817,16 @@ prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" -prettier@1.13.4: - version "1.13.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6" +pretender@^1.6: + version "1.6.1" + resolved "https://registry.yarnpkg.com/pretender/-/pretender-1.6.1.tgz#77d1e42ac8c6b298f5cd43534a87645df035db8c" + dependencies: + fake-xml-http-request "^1.6.0" + route-recognizer "^0.3.3" + +prettier@^1.13.0: + version "1.14.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.2.tgz#0ac1c6e1a90baa22a62925f41963c841983282f9" process-nextick-args@~1.0.6: version "1.0.7" @@ -886,6 +897,10 @@ rimraf@^2.2.8, rimraf@^2.6.1: dependencies: glob "^7.0.5" +route-recognizer@^0.3.3: + version "0.3.4" + resolved "https://registry.yarnpkg.com/route-recognizer/-/route-recognizer-0.3.4.tgz#39ab1ffbce1c59e6d2bdca416f0932611e4f3ca3" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"