From 8ea553cb8d901de7fea2bac1bb08ae47e62f8b5d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 9 Oct 2016 20:17:30 -0700 Subject: [PATCH] Fixed setup for gulp-shenanigans 0.5.15 Tests needed to be updated to the new form. --- src/MenuGraphr.ts | 2 +- test/MenuGraphr/_.ts | 8 ++++---- test/tsconfig.json | 6 ++++-- test/utils/mocks.ts | 10 ++++++---- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/MenuGraphr.ts b/src/MenuGraphr.ts index e83cb4b..48b993e 100644 --- a/src/MenuGraphr.ts +++ b/src/MenuGraphr.ts @@ -994,7 +994,7 @@ export class MenuGraphr implements IMenuGraphr { return things; } - + // If the next word would pass the edge of the menu, move down a line if (x + this.computeFutureWordLength(words[i + 1], textWidth, textPaddingX) >= menu.right - menu.textXOffset - textPaddingRight) { x = menu.textX; diff --git a/test/MenuGraphr/_.ts b/test/MenuGraphr/_.ts index e6ec106..bc1c3ce 100644 --- a/test/MenuGraphr/_.ts +++ b/test/MenuGraphr/_.ts @@ -1,7 +1,7 @@ /// /// -/// -/// -/// -mochaLoader.addTest("_", (): void => { }); +import { mochaLoader } from "../main"; +import { mocks } from "../utils/mocks"; + +mochaLoader.it("_", (): void => { }); diff --git a/test/tsconfig.json b/test/tsconfig.json index 7cfcc39..c9aedba 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,9 +1,11 @@ { "compilerOptions": { - "target": "es3", - "declaration": false + "declaration": false, + "module": "amd", + "target": "es3" }, "files": [ + "main.ts", "utils/mocks.ts", "utils/MochaLoader.ts", "MenuGraphr/_.ts" diff --git a/test/utils/mocks.ts b/test/utils/mocks.ts index dc60b37..4678ae9 100644 --- a/test/utils/mocks.ts +++ b/test/utils/mocks.ts @@ -1,10 +1,12 @@ -/// +import { IMenuGraphr, IMenuGraphrSettings } from "../../src/IMenuGraphr"; +import { MenuGraphr } from "../../src/MenuGraphr"; -const mocks = { + +export const mocks = { /** * */ - mockMenuGraphr: (settings: MenuGraphr.IMenuGraphrSettings): MenuGraphr.IMenuGraphr => { - return new MenuGraphr.MenuGraphr(settings); + mockMenuGraphr: (settings?: IMenuGraphrSettings): IMenuGraphr => { + return new MenuGraphr(settings); } };