@yak-spirit/yak-swap-ui
Version:
A reusable React component for swapping with Yield Yak Router. The YY Router can be found [here](https://github.com/yieldyak/yak-aggregator).
20 lines (19 loc) • 552 B
JavaScript
import { assert, expect, test } from 'vitest';
test('Math.sqrt()', () => {
assert.equal(Math.sqrt(4), 2);
assert.equal(Math.sqrt(2), Math.SQRT2);
expect(Math.sqrt(144)).toStrictEqual(12);
});
test('JSON', () => {
const input = {
foo: 'hello',
bar: 'world',
};
const output = JSON.stringify(input);
expect(input).toEqual({
foo: 'hello',
bar: 'world',
});
expect(output).toEqual('{"foo":"hello","bar":"world"}');
assert.deepEqual(JSON.parse(output), input, 'matches original');
});