You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/packages/svelte/tests/runtime-legacy/samples/transition-css-in-out-in-wi.../_config.js

25 lines
511 B

import { ok, test } from '../../test';
export default test({
test({ assert, component, target, raf }) {
component.visible = true;
const div = target.querySelector('div');
ok(div);
assert.equal(div.style.color, 'blue');
component.visible = false;
assert.equal(div.style.color, 'yellow');
// change param
raf.tick(1);
component.param = true;
component.visible = true;
assert.equal(div.style.color, 'red');
component.visible = false;
assert.equal(div.style.color, 'green');
}
});