Skip to content

Commit

Permalink
move code to modules folder
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyraspopov committed Oct 17, 2024
1 parent 8afcec8 commit e57a3f7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions oscillation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { motion } from "./modules/motion.js";
export { spring, springs } from "./modules/spring.js";
12 changes: 4 additions & 8 deletions oscillation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ let test = base.extend({

test("interpolation with ideal timer condition", async ({ execute, advance }) => {
let snapshots = await execute(async () => {
let { motion } = await import("./motion.js");
let { spring } = await import("./spring.js");
let { motion, spring } = await import("./oscillation.js");
let snapshots = [];
let ctl = new AbortController();
motion(spring(0, 10), (x) => snapshots.push(x), { signal: ctl.signal });
Expand All @@ -51,8 +50,7 @@ test("interpolation with ideal timer condition", async ({ execute, advance }) =>

test("eventual interpolation completeness", async ({ execute, advance }) => {
let snapshots = await execute(async () => {
let { motion } = await import("./motion.js");
let { spring } = await import("./spring.js");
let { motion, spring } = await import("./oscillation.js");
let snapshots = [];
let ctl = new AbortController();
motion(spring(0, 10), (x) => snapshots.push(x), { signal: ctl.signal });
Expand All @@ -67,8 +65,7 @@ test("eventual interpolation completeness", async ({ execute, advance }) => {

test("interpolation with inconsistent timer condition", async ({ execute, advance }) => {
let snapshots = await execute(async () => {
let { motion } = await import("./motion.js");
let { spring } = await import("./spring.js");
let { motion, spring } = await import("./oscillation.js");
let snapshots = [];
let ctl = new AbortController();
motion(spring(0, 10), (x) => snapshots.push(x), { signal: ctl.signal });
Expand Down Expand Up @@ -102,8 +99,7 @@ test("explicit motion cancellation", async ({ execute, advance }) => {
let ctl = await execute(() => new AbortController());

let snapshots = await execute(async (ctl) => {
let { motion } = await import("./motion.js");
let { spring } = await import("./spring.js");
let { motion, spring } = await import("./oscillation.js");
let snapshots = [];
motion(spring(-10, -100), (x) => snapshots.push(x), { signal: ctl.signal });
return snapshots;
Expand Down

0 comments on commit e57a3f7

Please sign in to comment.