Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('#render instantiates TranslationBinding - simple string literal', function () {
const container = setup();
const sut: IInstructionRenderer = new TranslationBindingRenderer(container.get(IExpressionParser), {} as unknown as IObserverLocator);
const expressionParser = container.get(IExpressionParser);
const renderable = ({} as unknown as IController);
const from = expressionParser.parse('simple.key', BindingType.CustomCommand);
const callBindingInstruction: ICallBindingInstruction = { from } as unknown as ICallBindingInstruction;
sut.render(
LifecycleFlags.none,
DOM,
container as unknown as IRenderContext,
renderable,
DOM.createElement('span'),
callBindingInstruction);
assert.instanceOf(renderable.bindings[0], TranslationBinding);
});
it('instantiated with instruction type', function () {
const container = setup();
const sut: IInstructionRenderer = new TranslationBindingRenderer(container.get(IExpressionParser), {} as unknown as IObserverLocator);
assert.equal(sut.instructionType, TranslationInstructionType);
});