|
1 | 1 | import { test } from "uvu";
|
2 | 2 | import * as assert from "uvu/assert";
|
3 | 3 |
|
4 |
| -import { Base } from "../index.js"; |
5 |
| -import { fooPlugin } from "../plugins/foo/index.js"; |
6 |
| -import { barPlugin } from "../plugins/bar/index.js"; |
7 |
| -import { voidPlugin } from "../plugins/void/index.js"; |
| 4 | +import { Base } from "./index.js"; |
| 5 | +import { fooPlugin } from "./plugins/foo/index.js"; |
| 6 | +import { barPlugin } from "./plugins/bar/index.js"; |
| 7 | +import { voidPlugin } from "./plugins/void/index.js"; |
8 | 8 |
|
9 | 9 | test(".plugin(fooPlugin)", () => {
|
10 | 10 | const FooTest = Base.plugin(fooPlugin);
|
@@ -46,12 +46,18 @@ test(".defaults({one: 1}).defaults({two: 2})", () => {
|
46 | 46 | });
|
47 | 47 |
|
48 | 48 | test(".defaults({foo: 'bar', baz: 'daz' })", () => {
|
49 |
| - const BaseWithDefaults = Base.defaults({ foo: "bar" }).defaults({ baz: "daz" }); |
| 49 | + const BaseWithDefaults = Base.defaults({ foo: "bar" }).defaults({ |
| 50 | + baz: "daz", |
| 51 | + }); |
50 | 52 | const defaultsTest = new BaseWithDefaults();
|
51 | 53 | const mergedOptionsTest = new BaseWithDefaults({ faz: "boo" });
|
52 | 54 | assert.equal(BaseWithDefaults.defaultOptions, { foo: "bar", baz: "daz" });
|
53 | 55 | assert.equal(defaultsTest.options, { foo: "bar", baz: "daz" });
|
54 |
| - assert.equal(mergedOptionsTest.options, { foo: "bar", baz: "daz", faz: "boo" }); |
| 56 | + assert.equal(mergedOptionsTest.options, { |
| 57 | + foo: "bar", |
| 58 | + baz: "daz", |
| 59 | + faz: "boo", |
| 60 | + }); |
55 | 61 | });
|
56 | 62 |
|
57 | 63 | test(".plugin().defaults()", () => {
|
|
0 commit comments