mirror of https://github.com/sveltejs/svelte
Merge pull request #3762 from sveltejs/gh-3761
allow spring/tweened values to be initially undefinedpull/3817/head
commit
e931a56854
@ -0,0 +1,23 @@
|
||||
import * as assert from 'assert';
|
||||
import { get } from '../../store';
|
||||
import { spring, tweened } from '../../motion';
|
||||
|
||||
describe('motion', () => {
|
||||
describe('spring', () => {
|
||||
it('handles initially undefined values', () => {
|
||||
const size = spring();
|
||||
|
||||
size.set(100);
|
||||
assert.equal(get(size), 100);
|
||||
});
|
||||
});
|
||||
|
||||
describe('tweened', () => {
|
||||
it('handles initially undefined values', () => {
|
||||
const size = tweened();
|
||||
|
||||
size.set(100);
|
||||
assert.equal(get(size), 100);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in new issue