Current Dev State

This commit is contained in:
Tim Lorsbach
2025-06-23 20:13:54 +02:00
parent b4f9bb277d
commit ded50edaa2
22617 changed files with 4345095 additions and 174 deletions

View File

@ -0,0 +1,30 @@
import test from 'ava';
import { setup } from './helpers/setup';
test('should not modify data', async t => {
const { wax, defaultData } = setup();
wax.data();
t.deepEqual(Object.keys(wax.context), defaultData);
});
test('should register data by object', async t => {
const { wax } = setup();
const foo = 'hello';
const bar = 'world';
wax.data({ foo, bar });
t.is(wax.context.foo, foo);
t.is(wax.context.bar, bar);
});
test('should register data by globbed object', async t => {
const { wax } = setup();
wax.data('./fixtures/data/object/**/*.{js,json}');
t.is(wax.context.hello, 'world');
t.deepEqual(wax.context.good.night, ['chair', 'bear', 'moon']);
});