setTimeout(() => { assert.match(printed[0], /error/); console.error = oldError; done(); }, 10);
it("does not add the bot user", () => { const handler = new PresenceHandler(bot as DiscordBot); handler.EnqueueUser(new MockUser("1234", "def") as any); Chai.assert.equal(handler.QueueCount, 0); });
it('match #3: should correctly append custom node into the obfuscated code', () => { assert.match(obfuscatedCode, consoleWarnRegExp); });
it("should not do anything if same order given (same object, shallow equality)", ()=>{ const order = "0,1,2,3,4".split(","); transitionSortConfig({sortConfig:{order}},{sortConfig:{order}}, oncoprint); assert.equal(oncoprint.setSortConfig.callCount, 0); });
it("should not do anything if heatmap index specified, same heatmap index specified before", ()=>{ transitionSortConfig({sortConfig:{clusterHeatmapTrackGroupIndex:2}}, {sortConfig:{clusterHeatmapTrackGroupIndex:2}}, oncoprint); assert.equal(oncoprint.setSortConfig.callCount, 0); });
it("should return 2 for one empty input and one with two (both added/deleted)", ()=>{ assert.equal(numTracksWhoseDataChanged([{key:"a", data:[]},{key:"b", data:[]}], []), 2, "tracks added"); assert.equal(numTracksWhoseDataChanged([], [{key:"a", data:[]},{key:"b", data:[]}]), 2, "tracks deleted"); });
it("should not do anything if no sortConfig specified", ()=>{ transitionSortConfig({}, {}, oncoprint); assert.equal(oncoprint.setSortConfig.callCount, 0); });
it('accepts a single argument of the name', () => { var annotation = new annotations.FieldAnnotation("test"); assert.equal(annotation.name, "test"); assert.isUndefined(annotation.nullable); });
it("handles no failures", () => { const result = JSON.parse(formatter.format([])); assert.deepEqual(result, []); });
}).then((result) => { assert.deepEqual(result.data, data); });