UNPKG

427 BJavaScriptView Raw
1const { format } = require('../src');
2
3test('It indents using spaces (default)', () => {
4 const json = {
5 name: 'Test',
6 description: 'Description',
7 version: '0.0.0'
8 };
9
10 expect(format(json)).toMatchSnapshot();
11});
12
13test('It indents using tabs', () => {
14 const json = {
15 name: 'Test',
16 description: 'Description',
17 version: '0.0.0'
18 };
19
20 expect(format(json, { useTabs: true })).toMatchSnapshot();
21});