mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
DEV: Import pretender instead of global server var (#8996)
* DEV: Remove server global test variable * Delete yarn-error.log * prettier and some eslint fixes * add global server variable back for plugins * rename imported server to pretender * prettier * support plugin server. usage * Export pretender as named * Prettier * change default pretender export * fix bad import * Use pretender() and original default export * export new Pretender as default * fix accidental change * WIP testing * add pretend handlers in correct location * move more stuff into the correct pretender * Consolidated more pretenders * comment out another bad test * fix user acceptance tests * commented out bad test * fixed another composer server stub * fix more tests * fixed tag test pretender * Fix admin email test * removed another draft handler * add back test * fix and uncomment another test * remove test that is not useful * remove commented out lines * reapply handlers between every test * no need to re-stub requests now :) * cleanup from review * more cleanup
This commit is contained in:

committed by
GitHub

parent
fedd8e3e3a
commit
176aa0ac7d
@ -1,6 +1,7 @@
|
||||
import selectKit from "helpers/select-kit-helper";
|
||||
import componentTest from "helpers/component-test";
|
||||
import EmberObject from "@ember/object";
|
||||
import pretender from "helpers/create-pretender";
|
||||
|
||||
moduleForComponent("badge-title", { integration: true });
|
||||
|
||||
@ -23,8 +24,7 @@ componentTest("badge title", {
|
||||
},
|
||||
|
||||
async test(assert) {
|
||||
/* global server */
|
||||
server.put("/u/eviltrout/preferences/badge_title", () => [
|
||||
pretender.put("/u/eviltrout/preferences/badge_title", () => [
|
||||
200,
|
||||
{ "Content-Type": "application/json" },
|
||||
{}
|
||||
|
Reference in New Issue
Block a user