qunit-decorators
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -36,5 +36,7 @@ "use strict"; | ||
: `Unnamed QUnit Module ${Math.round(1e6 + Math.random() * 1e6).toString(16)}`; | ||
let returned = fn(normalizedName, hks => { | ||
let returned = fn(normalizedName, function (hks) { | ||
if (nested) | ||
nested(hks); | ||
let instance = new target(hks); | ||
Object.assign(this, instance); | ||
if (hooks && hooks.before) | ||
@@ -48,11 +50,13 @@ hks.before(hooks.before); | ||
hks.afterEach(hooks.afterEach); | ||
if (target.before) | ||
hks.before(target.before); | ||
if (target.after) | ||
hks.after(target.after); | ||
if (target.prototype.beforeEach) { | ||
hks.beforeEach(target.prototype.beforeEach); | ||
if (instance.before) { | ||
hks.before(instance.before); | ||
} | ||
if (target.prototype.afterEach) | ||
hks.afterEach(target.prototype.afterEach); | ||
if (instance.after) { | ||
hks.after(instance.after); | ||
} | ||
if (instance.beforeEach) { | ||
hks.beforeEach(instance.beforeEach); | ||
} | ||
if (instance.afterEach) | ||
hks.afterEach(instance.afterEach); | ||
const { initTasks } = getModuleMetadata(target).testData; | ||
@@ -219,2 +223,2 @@ Object.keys(initTasks) | ||
exports.test = testDecorator; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiL2hvbWUvdHJhdmlzL2J1aWxkL21pa2Utbm9ydGgvcXVuaXQtZGVjb3JhdG9ycy8iLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMkJBQTJCO0FBQzNCLE1BQU0sY0FBYyxHQUFHLHNCQUFzQixJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxHQUFHLENBQUMsRUFBRSxDQUFDO0FBd0IvRSwyQkFBMkIsVUFBNkI7SUFDdEQsTUFBTSxHQUFHLEdBQUcsVUFBaUIsQ0FBQztJQUM5Q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HwgKChob29rczogTmVzdGVkSG9va3MpID0+IHZvaWQpLFxuICBtZXRhT3JOZXN0ZWQ/OiB7IFtrOiBzdHJpbmddOiBhbnkgfSB8ICgoaG9va3M6IE5lc3RlZEhvb2tzKSA9PiB2b2lkKSxcbiAgbmVzdGVkPzogKChob29rczogTmVzdGVkSG9va3MpID0+IHZvaWQpXG4pOiBDbGFzc0RlY29yYXRvciB8IHZvaWQge1xuICBpZiAodHlwZW9mIG5hbWVNZXRhT3JUYXJnZXQgIT09ICdmdW5jdGlvbicpIHtcbiAgICByZXR1cm4gKHRhcmdldDogYW55KSA9PiB7XG4gICAgICBjb25zdCBhcmczaXNIb29rcyA9XG4gICAgICAgIHR5cGVvZiBob29rc01ldGFPck5lc3RlZCA9PT0gJ29iamVjdCcgJiYgaXNIb29rcyhob29rc01ldGFPck5lc3RlZCk7XG4gICAgICBjb25zdCBuYW1lID1cbiAgICAgICAgdHlwZW9mIG5hbWVNZXRhT3JUYXJnZXQgPT09ICdzdHJpbmcnID8gbmFtZU1ldGFPclRhcmdldCA6IHRhcmdldC5uYW1lO1xuICAgICAgbGV0IGhvb2tzID0gYXJnM2lzSG9va3MgPyBob29rc01ldGFPck5lc3RlZCA6IHVuZGVmaW5lZDtcbiAgICAgIGNvbnN0IG1ldGEgPVxuICAgICAgICB0eXBlb2YgbmFtZU1ldGFPclRhcmdldCAhPT0gJ3N0cmluZydcbiAgICAgICAgICA/IG5hbWVNZXRhT3JUYXJnZXRcbiAgICAgICAgICA6ICFhcmczaXNIb29rc1xuICAgICAgICAgICAgPyBob29rc01ldGFPck5lc3RlZFxuICAgICAgICAgICAgOiB0eXBlb2YgbWV0YU9yTmVzdGVkICE9PSAnZnVuY3Rpb24nXG4gICAgICAgICAgICAgID8gbWV0YU9yTmVzdGVkXG4gICAgICAgICAgICAgIDoge307XG4gICAgICBsZXQgbmVzdGVkRm4gPVxuICAgICAgICB0eXBlb2YgaG9va3NNZXRhT3JOZXN0ZWQgIT09ICdvYmplY3Qn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GVjb3JhdG9yIGFzIGRlYztcbiJdfQ== |
@@ -34,5 +34,7 @@ // tslint:disable ban-types | ||
: `Unnamed QUnit Module ${Math.round(1e6 + Math.random() * 1e6).toString(16)}`; | ||
let returned = fn(normalizedName, hks => { | ||
let returned = fn(normalizedName, function (hks) { | ||
if (nested) | ||
nested(hks); | ||
let instance = new target(hks); | ||
Object.assign(this, instance); | ||
if (hooks && hooks.before) | ||
@@ -46,11 +48,13 @@ hks.before(hooks.before); | ||
hks.afterEach(hooks.afterEach); | ||
if (target.before) | ||
hks.before(target.before); | ||
if (target.after) | ||
hks.after(target.after); | ||
if (target.prototype.beforeEach) { | ||
hks.beforeEach(target.prototype.beforeEach); | ||
if (instance.before) { | ||
hks.before(instance.before); | ||
} | ||
if (target.prototype.afterEach) | ||
hks.afterEach(target.prototype.afterEach); | ||
if (instance.after) { | ||
hks.after(instance.after); | ||
} | ||
if (instance.beforeEach) { | ||
hks.beforeEach(instance.beforeEach); | ||
} | ||
if (instance.afterEach) | ||
hks.afterEach(instance.afterEach); | ||
const { initTasks } = getModuleMetadata(target).testData; | ||
@@ -217,2 +221,2 @@ Object.keys(initTasks) | ||
export const test = testDecorator; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiL2hvbWUvdHJhdmlzL2J1aWxkL21pa2Utbm9ydGgvcXVuaXQtZGVjb3JhdG9ycy8iLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDJCQUEyQjtBQUMzQixNQUFNLGNBQWMsR0FBRyxzQkFBc0IsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxDQUFDLEVBQUUsQ0FBQztBQXdCL0UsMkJBQTJCLFVBQTZCO0lBQ3RELE1BQU0sR0FBRyxHQUFHLFVBQWlCLENBQUM7SUFDOUI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dGVkSG9va3MpID0+IHZvaWQpLFxuICBtZXRhT3JOZXN0ZWQ/OiB7IFtrOiBzdHJpbmddOiBhbnkgfSB8ICgoaG9va3M6IE5lc3RlZEhvb2tzKSA9PiB2b2lkKSxcbiAgbmVzdGVkPzogKChob29rczogTmVzdGVkSG9va3MpID0+IHZvaWQpXG4pOiBDbGFzc0RlY29yYXRvciB8IHZvaWQge1xuICBpZiAodHlwZW9mIG5hbWVNZXRhT3JUYXJnZXQgIT09ICdmdW5jdGlvbicpIHtcbiAgICByZXR1cm4gKHRhcmdldDogYW55KSA9PiB7XG4gICAgICBjb25zdCBhcmczaXNIb29rcyA9XG4gICAgICAgIHR5cGVvZiBob29rc01ldGFPck5lc3RlZCA9PT0gJ29iamVjdCcgJiYgaXNIb29rcyhob29rc01ldGFPck5lc3RlZCk7XG4gICAgICBjb25zdCBuYW1lID1cbiAgICAgICAgdHlwZW9mIG5hbWVNZXRhT3JUYXJnZXQgPT09ICdzdHJpbmcnID8gbmFtZU1ldGFPclRhcmdldCA6IHRhcmdldC5uYW1lO1xuICAgICAgbGV0IGhvb2tzID0gYXJnM2lzSG9va3MgPyBob29rc01ldGFPck5lc3RlZCA6IHVuZGVmaW5lZDtcbiAgICAgIGNvbnN0IG1ldGEgPVxuICAgICAgICB0eXBlb2YgbmFtZU1ldGFPclRhcmdldCAhPT0gJ3N0cmluZydcbiAgICAgICAgICA/IG5hbWVNZXRhT3JUYXJnZXRcbiAgICAgICAgICA6ICFhcmczaXNIb29rc1xuICAgICAgICAgICAgPyBob29rc01ldGFPck5lc3RlZFxuICAgICAgICAgICAgOiB0eXBlb2YgbWV0YU9yTmVzdGVkICE9PSAnZnVuY3Rpb24nXG4gICAgICAgICAgICAgID8gbWV0YU9yTmVzdGVkXG4gICAgICAgICAgICAgIDoge307XG4gICAgICBsZXQgbmVzdGVkRm4gPVxuICAgICAgICB0eXBlb2YgaG9va3NNZXRhT3JOZXN0ZWQgIT09ICdvYmplY3QnXG4gICAgICAgICAgP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hbnkpLnRvZG8gPSB0ZXN0VG9kbztcblxuZXhwb3J0IGNvbnN0IHRlc3QgPSB0ZXN0RGVjb3JhdG9yIGFzIGRlYztcbiJdfQ== |
{ | ||
"name": "qunit-decorators", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "QUnit tests in ES6 and TypeScript via decorators", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/src/index.js", |
@@ -132,3 +132,3 @@ # QUnit Decorators | ||
You may define hooks as static and member functions on the module's class | ||
You may define hooks as member functions on the module's class | ||
@@ -143,10 +143,9 @@ ```ts | ||
class BetterModule { | ||
// before and after are static functions | ||
static before() { | ||
before() { | ||
server = new Pretender(); | ||
} | ||
static after() { | ||
after() { | ||
server.shutdown(); | ||
} | ||
// beforeEach and afterEach are member functions | ||
beforeEach() { ... } | ||
@@ -153,0 +152,0 @@ afterEach() { ... } |
@@ -65,3 +65,3 @@ // tslint:disable ban-types | ||
) { | ||
let fn = QUnit.module; | ||
let fn: (name: string, cb: (this: any, hooks: NestedHooks) => void) => void = QUnit.module; | ||
if (options.skip) fn = (QUnit.module as any).skip; | ||
@@ -76,4 +76,6 @@ else if (options.only) fn = (QUnit.module as any).only; | ||
)}`; | ||
let returned: any = fn(normalizedName, hks => { | ||
let returned: any = fn(normalizedName, function(this: any, hks: NestedHooks) { | ||
if (nested) nested(hks); | ||
let instance = new target(hks); | ||
Object.assign(this, instance); | ||
if (hooks && hooks.before) hks.before(hooks.before); | ||
@@ -83,8 +85,12 @@ if (hooks && hooks.after) hks.after(hooks.after); | ||
if (hooks && hooks.afterEach) hks.afterEach(hooks.afterEach); | ||
if (target.before) hks.before(target.before); | ||
if (target.after) hks.after(target.after); | ||
if (target.prototype.beforeEach) { | ||
hks.beforeEach(target.prototype.beforeEach); | ||
if (instance.before) { | ||
hks.before(instance.before); | ||
} | ||
if (target.prototype.afterEach) hks.afterEach(target.prototype.afterEach); | ||
if (instance.after) { | ||
hks.after(instance.after); | ||
} | ||
if (instance.beforeEach) { | ||
hks.beforeEach(instance.beforeEach); | ||
} | ||
if (instance.afterEach) hks.afterEach(instance.afterEach); | ||
const { initTasks } = getModuleMetadata(target).testData; | ||
@@ -91,0 +97,0 @@ Object.keys(initTasks) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
97236
959
0
198