本文整理汇总了TypeScript中chai.assert.isNotTrue方法的典型用法代码示例。如果您正苦于以下问题:TypeScript assert.isNotTrue方法的具体用法?TypeScript assert.isNotTrue怎么用?TypeScript assert.isNotTrue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chai.assert
的用法示例。
在下文中一共展示了assert.isNotTrue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("should correctly dispatch errorRanges", function() {
let error: Error = new Error("An error occurred");
state = reducer(state, raft.errorRanges(error));
assert.isNotTrue(state.inFlight);
assert.isNotTrue(state.isValid);
assert.deepEqual(state.lastError, error);
});
示例2: it
it('should allow excluding time', function () {
const schedule = new Schedule();
assert.isNotTrue(schedule.isWithinTimeslot(new Date()), 'Default to have no timeslot selected');
schedule.includeHour(0);
assert.isTrue(schedule.isWithinTimeslot(new Date(2016, 8, 11, 0, 0, 0)), 'should within timeslot');
schedule.excludeHour(0);
assert.isNotTrue(schedule.isWithinTimeslot(new Date(2016, 8, 11, 0, 0, 0)), 'timeslot just excluded');
assert.throw(() => { schedule.excludeHour(24); }, 'value should between 0-23');
assert.throw(() => { schedule.excludeHour(-1); }, 'value should between 0-23');
});
示例3: refreshRaft
return p.then((): Promise<void> => {
assert.isNull(mockDebugState.lastError);
assert.isTrue(mockDebugState.isValid);
assert.isNotTrue(mockDebugState.inFlight);
mockDebugState.isValid = false;
// second request should throw an error
let p2 = refreshRaft();
assert.isTrue(mockDebugState.inFlight);
return p2;
}).then(() => {
示例4:
}).then(() => {
// Assert that the server got the correct number of requests (2).
assert.lengthOf(fetchMock.calls("/_status/raft"), 2);
assert.isNotNull(mockDebugState.lastError);
assert.isNotTrue(mockDebugState.inFlight);
});