test: should not throw error for bind:this

pull/5942/head
Saurav Sahu 6 years ago
parent 66af40e3a9
commit 34d9830cc2

@ -600,7 +600,7 @@ export default class Element extends Node {
validate_bindings_foreign() {
this.bindings
// .filter(binding => binding.name !== 'this')
.filter(binding => binding.name !== 'this')
.forEach(binding => {
this.component.error(binding, {
code: 'invalid-binding',

@ -120,8 +120,8 @@ describe('validate', () => {
}, /Invalid namespace 'foriegn' \(did you mean 'foreign'\?\)/);
});
it('throws an error if \'this\' is bound for foreign element', () => {
assert.throws(() => {
it('does not throw error if \'this\' is bound for foreign element', () => {
assert.doesNotThrow(() => {
svelte.compile(`
<script>
let whatever;
@ -130,6 +130,6 @@ describe('validate', () => {
name: 'test',
namespace: 'foreign'
});
}, /'this' is not a valid binding/)
})
})
});

Loading…
Cancel
Save