本文整理汇总了TypeScript中chai.assert.notEqual方法的典型用法代码示例。如果您正苦于以下问题:TypeScript assert.notEqual方法的具体用法?TypeScript assert.notEqual怎么用?TypeScript assert.notEqual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chai.assert
的用法示例。
在下文中一共展示了assert.notEqual方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("applies correct protein colors wrt the corresponding prop", () => {
const scriptGenerator = new PyMolScriptGenerator();
const setColorStub = sinon.stub((scriptGenerator as any), "setColor");
let script: string = "";
props.proteinScheme = ProteinScheme.TRACE;
props.proteinColor = ProteinColor.SECONDARY_STRUCTURE;
script = scriptGenerator.generateScript("3pxe", "B", residues, props);
assert.notEqual(script.indexOf("select (chain B) and (ss h);"), -1);
assert.isTrue(setColorStub.withArgs("#FFA500").calledOnce,
"Alpha helices should be colored with 0xFFA500 when SECONDARY_STRUCTURE is selected");
assert.notEqual(script.indexOf("select (chain B) and (ss s);"), -1);
assert.isTrue(setColorStub.withArgs("#0000FF").calledOnce,
"Beta sheets should be colored with 0x0000FF when SECONDARY_STRUCTURE is selected");
props.proteinScheme = ProteinScheme.CARTOON;
props.proteinColor = ProteinColor.NC_RAINBOW;
script = scriptGenerator.generateScript("3pxe", "B", residues, props);
assert.notEqual(script.indexOf("spectrum count, rainbow_rev, sele;"), -1,
"Chain should be colored with rainbow spectrum when NC_RAINBOW is selected");
props.proteinScheme = ProteinScheme.SPACE_FILLING;
props.proteinColor = ProteinColor.ATOM_TYPE;
script = scriptGenerator.generateScript("3pxe", "B", residues, props);
assert.notEqual(script.indexOf("util.cbaw sele;"), -1,
"Chain should be colored with default element colors when ATOM_TYPE is selected");
});
示例2: it
it('should have different ComponentType(s)', async () => {
const componentType1: ComponentType = ComponentType.getFor(ComponentA)
const componentType2: ComponentType = ComponentType.getFor(ComponentB)
assert.equal(false, componentType1.equals(componentType2))
assert.equal(false, componentType2.equals(componentType1))
assert.notEqual(componentType1.getIndex(), componentType2.getIndex())
assert.notEqual(componentType1.getIndex(), ComponentType.getIndexFor(ComponentB))
assert.notEqual(componentType2.getIndex(), ComponentType.getIndexFor(ComponentA))
})
示例3: it
it('should return an array of the correct fields', () => {
const fields: string[] = schema.fieldNames();
assert.equal(fields.length, 4);
assert.notEqual(fields.indexOf('a'), -1);
assert.notEqual(fields.indexOf('b'), -1);
assert.notEqual(fields.indexOf('c'), -1);
assert.notEqual(fields.indexOf('d'), -1);
});
示例4: it
it("two lines", () => {
const text = "hello world!.";
const availableWidth = measurer.measure(text).width - 2;
const baseWrapper = new Wrapper().maxLines(2);
const result = wrapper.wrap(text, measurer, availableWidth);
const baseResult = baseWrapper.wrap(text, measurer, availableWidth);
const baseDimensions = measurer.measure(baseResult.wrappedText);
const dimensions = measurer.measure(result.wrappedText);
assert.deepEqual(result.originalText, text, "original text has been set");
assert.notEqual(result.wrappedText, text, "wrapped text is not the whole line");
assert.notEqual(result.wrappedText, baseResult.wrappedText, "wrapped text looks better");
assert.operator(dimensions.width, "<", baseDimensions.width, "occupies less width");
assert.equal(dimensions.height, baseDimensions.height, "occupies same height");
assert.operator(dimensions.width, "<=", availableWidth, "wrapped text fits in");
});
示例5: it
it ('should not copy one object twice', () => {
interface INameAge { name:string; age:number;
}
const propertyObject:INameAge = {name: 'Foo', age: 42};
const origObject:{foo:INameAge, bar:INameAge } = {
foo: propertyObject,
bar: propertyObject
};
const copyObject:{foo:INameAge, bar:INameAge } =
object.copy(origObject, true);
chai.assert.notEqual(origObject.foo, copyObject.foo);
chai.assert.notEqual(origObject.bar, copyObject.bar);
chai.assert.equal(copyObject.foo, copyObject.bar);
});
示例6: it
it('should not overwrite existing gene information', () => {
const mutations = [
{
gene: {
hugoGeneSymbol: "AR",
entrezGeneId: -1
},
entrezGeneId: -1
}
];
updateMissingGeneInfo(mutations as Partial<Mutation>[], genesByHugoSymbol);
assert.notEqual(mutations[0].entrezGeneId, genesByHugoSymbol["AR"].entrezGeneId);
assert.notEqual(mutations[0].gene.entrezGeneId, genesByHugoSymbol["AR"].entrezGeneId);
});
示例7: async
export const schemaLookup = async (data = dataSchemaLookup()) => {
const schema = await Schema.lookup(data)
assert.notEqual(schema.handle, undefined)
assert.equal(schema.sourceId, data.sourceId)
assert.ok(schema.schemaId)
return schema
}