本文整理匯總了TypeScript中assert.equal函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript equal函數的具體用法?TypeScript equal怎麽用?TypeScript equal使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了equal函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("not muted by default", () => {
const t = new TrackMute()
assert.equal(t.isMuted(0), false)
assert.equal(t.isMuted(100), false)
})
示例2:
complete: () => {
assert.equal(innerExpected.length, 0);
}
示例3: done
complete: () => {
assert.equal(expected.length, 0);
done();
}
示例4:
service.backupResource(untitledFile, 'test').then(() => {
assert.equal(fs.existsSync(workspaceBackupPath), false);
done();
});
示例5: test
test('simple', () => {
const model = new BackupFilesModel();
const resource1 = Uri.file('test.html');
assert.equal(model.has(resource1), false);
model.add(resource1);
assert.equal(model.has(resource1), true);
assert.equal(model.has(resource1, 0), true);
assert.equal(model.has(resource1, 1), false);
model.remove(resource1);
assert.equal(model.has(resource1), false);
model.add(resource1);
assert.equal(model.has(resource1), true);
assert.equal(model.has(resource1, 0), true);
assert.equal(model.has(resource1, 1), false);
model.clear();
assert.equal(model.has(resource1), false);
model.add(resource1, 1);
assert.equal(model.has(resource1), true);
assert.equal(model.has(resource1, 0), false);
assert.equal(model.has(resource1, 1), true);
const resource2 = Uri.file('test1.html');
const resource3 = Uri.file('test2.html');
const resource4 = Uri.file('test3.html');
model.add(resource2);
model.add(resource3);
model.add(resource4);
assert.equal(model.has(resource1), true);
assert.equal(model.has(resource2), true);
assert.equal(model.has(resource3), true);
assert.equal(model.has(resource4), true);
});
示例6: it
it('Empty elements should be self-close', () => {
assert.equal(o2xml({foo: {}}), '<foo />');
assert.equal(o2xml({bar: null}), '<bar />');
});
示例7: run
(function(){
var i = run('w = [Imperative]{ return = [Associative]{ return = 8; }}');
assert.equal( 8, i.env.lookup("w").value );
})();