本文整理汇总了TypeScript中chai.assert.isNotOk方法的典型用法代码示例。如果您正苦于以下问题:TypeScript assert.isNotOk方法的具体用法?TypeScript assert.isNotOk怎么用?TypeScript assert.isNotOk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chai.assert
的用法示例。
在下文中一共展示了assert.isNotOk方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should not have ' + propKey + ' wildcardIndex if it is specific.', () => {
let specQ = duplicate(templateSpecQ);
const wildcardIndex = SpecQueryModel.build(specQ, schema, DEFAULT_QUERY_CONFIG).wildcardIndex;
assert.isNotOk(wildcardIndex.encodingIndicesByProperty.get(nestedProp));
assert.isNotOk(wildcardIndex.encodings[0]);
});
示例2: it
it('utils.isObject()', () => {
assert.isOk(isObject({}));
assert.isOk(isObject({ 'a': 'b' }));
assert.isNotOk(isObject([]));
assert.isNotOk(isObject([{}]));
assert.isNotOk(isObject([{}, {}]));
});
示例3: it
it('truthy test', () => {
assert.isNotOk(truthy(undefined))
assert.isNotOk(truthy(null))
assert.isOk(truthy(1))
assert.isOk(truthy({}))
assert.isNotOk(truthy(false))
})
示例4: it
it('should returns object with empty obfuscated code and source map with empty data if source code is empty', () => {
let obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
'',
Object.assign({}, NO_CUSTOM_NODES_PRESET, {
sourceMap: true
})
);
assert.isNotOk(obfuscationResult.getObfuscatedCode());
assert.deepEqual(JSON.parse(obfuscationResult.getSourceMap()).names, []);
assert.deepEqual(JSON.parse(obfuscationResult.getSourceMap()).sources, []);
assert.isNotOk(JSON.parse(obfuscationResult.getSourceMap()).mappings);
});
示例5: test
test('shell and fragments with shared dependency', async () => {
await setupTest({
root: defaultRoot,
entrypoint: 'entrypoint-a.html',
shell: 'shell.html',
fragments: ['entrypoint-b.html', 'entrypoint-c.html'],
});
// shell bundles framework
const shellDoc = parse5(getFileOrDie('shell.html'));
assert.isTrue(hasMarker(shellDoc, 'framework'));
assert.isFalse(hasImport(shellDoc, 'framework.html'));
// shell bundles commonDep
assert.isTrue(hasMarker(shellDoc, 'commonDep'));
assert.isFalse(hasImport(shellDoc, 'common-dependency.html'));
// entrypoint B doesn't import commonDep
const entrypointBDoc = parse5(getFileOrDie('entrypoint-b.html'));
assert.isFalse(hasMarker(entrypointBDoc, 'commonDep'));
assert.isFalse(hasImport(entrypointBDoc, 'common-dependency.html'));
// entrypoint C doesn't import commonDep
const entrypointCDoc = parse5(getFileOrDie('entrypoint-c.html'));
assert.isFalse(hasMarker(entrypointCDoc, 'commonDep'));
assert.isFalse(hasImport(entrypointCDoc, 'common-dependency.html'));
// entrypoints don't import shell
assert.isFalse(hasImport(entrypointBDoc, 'shell.html'));
assert.isFalse(hasImport(entrypointCDoc, 'shell.html'));
// No shared-bundle with a shell
assert.isNotOk(getFile('shared_bundle_1.html'));
});