Skip to content

🎥 Make videos programmatically with React

convert another package to bun test

Jonny Burgerd73790b8a6e5
diff --git a/packages/animation-utils/package.json b/packages/animation-utils/package.json
index bbeac03a68..480e9f8bb9 100644
--- a/packages/animation-utils/package.json
+++ b/packages/animation-utils/package.json
@@ -10,17 +10,20 @@
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"scripts": {
- "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
"formatting": "prettier src --check",
"lint": "eslint src --ext ts,tsx",
"watch": "tsc -w",
"build": "tsc -d && rollup --config rollup.config.js",
- "test": "vitest --run"
+ "test": "bun test src"
},
"dependencies": {
"remotion": "workspace:*"
},
- "files": ["dist", "!dist/tsconfig-esm.tsbuildinfo", "!dist/test"],
+ "files": [
+ "dist",
+ "!dist/tsconfig-esm.tsbuildinfo",
+ "!dist/test"
+ ],
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
@@ -32,7 +35,6 @@
"prettier-plugin-organize-imports": "3.2.4",
"eslint": "8.56.0",
"@jonny/eslint-config": "3.0.281",
- "vitest": "0.31.1",
"rollup": "^2.70.1"
},
"exports": {
@@ -47,5 +49,8 @@
"publishConfig": {
"access": "public"
},
- "keywords": ["remotion", "animation-utils"]
+ "keywords": [
+ "remotion",
+ "animation-utils"
+ ]
}
diff --git a/packages/animation-utils/src/test/interpolate-styles.test.ts b/packages/animation-utils/src/test/interpolate-styles.test.ts
index 5928855a25..39e550cd55 100644
--- a/packages/animation-utils/src/test/interpolate-styles.test.ts
+++ b/packages/animation-utils/src/test/interpolate-styles.test.ts
@@ -68,7 +68,7 @@ test('Throw error on incompatible shorthands', () => {
},
],
),
- ).throws(
+ ).toThrow(
/The start and end values must have the same structure. Start value: 20px 40px, end value: 80px/,
);
});
@@ -87,7 +87,7 @@ test('Should throw an error on non-animatable properties', () => {
},
],
),
- ).throws(
+ ).toThrow(
/Non-animatable values cannot be interpolated. Start value: center, end value: left/,
);
});
@@ -245,7 +245,7 @@ test('Should handle `border`', () => {
},
],
),
- ).throws(
+ ).toThrow(
/Non-animatable values cannot be interpolated. Start value: 1px solid black, end value: 10px dotted red/,
);
});
diff --git a/packages/animation-utils/src/test/make-transform.test.ts b/packages/animation-utils/src/test/make-transform.test.ts
index f805ba7e23..70ea9df157 100644
--- a/packages/animation-utils/src/test/make-transform.test.ts
+++ b/packages/animation-utils/src/test/make-transform.test.ts
@@ -22,7 +22,7 @@ test('makeTransform() should work well - base case', () => {
test('makeTransform() should work well - forgetting to pass a param', () => {
// @ts-expect-error
- expect(() => makeTransform([scale(), translateX(100)])).throws(
+ expect(() => makeTransform([scale(), translateX(100)])).toThrow(
'Argument passed to "scale" for param "x" is undefined',
);
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c6aa69522b..b7519c3931 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -55,9 +55,6 @@ importers:
rollup:
specifier: ^2.70.1
version: 2.76.0
- vitest:
- specifier: 0.31.1
- version: 0.31.1([email protected])
packages/astro-example:
dependencies:
@@ -490,9 +487,6 @@ importers:
rollup:
specifier: ^2.70.1
version: 2.76.0
- vitest:
- specifier: 0.31.1
- version: 0.31.1([email protected])
webpack:
specifier: 5.83.1
version: 5.83.1
@@ -22910,73 +22904,6 @@ packages:
- supports-color
- terser
- resolution: {integrity: sha512-/dOoOgzoFk/5pTvg1E65WVaobknWREN15+HF+0ucudo3dDG/vCZoXTQrjIfEaWvQXmqScwkRodrTbM/ScMpRcQ==}
- engines: {node: '>=v14.18.0'}
- hasBin: true
- peerDependencies:
- '@edge-runtime/vm': '*'
- '@vitest/browser': '*'
- '@vitest/ui': '*'
- happy-dom: '*'
- jsdom: '*'
- playwright: '*'
- safaridriver: '*'
- webdriverio: '*'
- peerDependenciesMeta:
- '@edge-runtime/vm':
- optional: true
- '@vitest/browser':
- optional: true
- '@vitest/ui':
- optional: true
- happy-dom:
- optional: true
- jsdom:
- optional: true
- playwright:
- optional: true
- safaridriver:
- optional: true
- webdriverio:
- optional: true
- dependencies:
- '@types/chai': 4.3.11
- '@types/chai-subset': 1.3.5
- '@types/node': 18.14.6
- '@vitest/expect': 0.31.1
- '@vitest/runner': 0.31.1
- '@vitest/snapshot': 0.31.1
- '@vitest/spy': 0.31.1
- '@vitest/utils': 0.31.1
- acorn: 8.11.3
- acorn-walk: 8.3.2
- cac: 6.7.14
- chai: 4.4.1
- concordance: 5.0.4
- debug: 4.3.4([email protected])
- jsdom: 21.1.0
- local-pkg: 0.4.3
- magic-string: 0.30.5
- pathe: 1.1.2
- picocolors: 1.0.0
- std-env: 3.7.0
- strip-literal: 1.3.0
- tinybench: 2.6.0
- tinypool: 0.5.0
- vite: 4.5.2(@types/[email protected])
- vite-node: 0.31.1(@types/[email protected])
- why-is-node-running: 2.2.2
- transitivePeerDependencies:
- - less
- - lightningcss
- - sass
- - stylus
- - sugarss
- - supports-color
- - terser
- dev: true
-
resolution: {integrity: sha512-9UG0s3Ss8rbaaPZL1AkGzdjrGY8F+P+Ne9snsrvD9gxltDGhsn8C2dQpqQewHrMW37OvlqJoI8sUU2AWDb+qNw==}
dependencies: