svelte-dev-helper
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -197,2 +197,5 @@ import Registry from './registry'; | ||
//work around _checkReadOnly in svelte (for computed properties) | ||
this.proxyTarget._updatingReadonlyProperty = true; | ||
//preserve local state (unless noPreserveState is true) | ||
@@ -210,2 +213,4 @@ if ( | ||
} | ||
this.proxyTarget._updatingReadonlyProperty = false; | ||
} | ||
@@ -212,0 +217,0 @@ } |
{ | ||
"name": "svelte-dev-helper", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Helper for svelte components to ease development", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -217,2 +217,29 @@ /* global describe, it */ | ||
it('rerenders components with computed properties (#6)', function() { | ||
const Component = require('./fixtures/mockComponentWithComputed').default; | ||
const id = 'computedComponent'; | ||
Registry.set(id, { | ||
rollback: null, | ||
component: Component, | ||
instances: [] | ||
}); | ||
// eslint-disable-next-line no-undef | ||
const target = document.body; | ||
const WrappedComponent = createProxy(id); | ||
const wrappedComponent = new WrappedComponent({ target }); | ||
// eslint-disable-next-line no-undef | ||
wrappedComponent._mount(target); | ||
configure({ noPreserveState: false }); | ||
wrappedComponent._rerender(); | ||
configure({ noPreserveState: true }); | ||
wrappedComponent._rerender(); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23645
15
539