本文整理汇总了TypeScript中models/callbacks/customjs.CustomJS类的典型用法代码示例。如果您正苦于以下问题:TypeScript CustomJS类的具体用法?TypeScript CustomJS怎么用?TypeScript CustomJS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CustomJS类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("should execute the code with args parameters correctly mapped", () => {
// the point of this test is that we shouldn't be relying on
// the definition order of keys in a JS object, though it
// is reliable in some JS runtimes
const r = new CustomJS({args: {
foo4: "foo4", foo5: "foo5", foo6: "foo6",
foo1: "foo1", foo2: "foo2", foo3: "foo3",
}, code: "return foo1 + foo2 + foo3 + foo4 + foo5 + foo6", use_strict: true})
expect(r.execute({})).to.be.equal("foo1foo2foo3foo4foo5foo6")
})