Skip to content

Commit 9f70133

Browse files
committed
fixup! feat(new tool): Env Variables Converter
1 parent dfe13de commit 9f70133

File tree

1 file changed

+33
-31
lines changed

1 file changed

+33
-31
lines changed
Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
1-
import { describe, expect } from 'vitest';
1+
import { describe, expect, it } from 'vitest';
22
import deflate from './deflate';
33

4-
describe('deflates json', () => {
5-
expect(deflate({ 'foo-bar': { baz: [{ biz: ['value1', 'value2'] }] } }, ''))
6-
.toStrictEqual(['foo-bar.baz[0].biz[0]=value1', 'foo-bar.baz[0].biz[1]=value2']);
7-
});
4+
describe('deflate', () => {
5+
it('deflates json', () => {
6+
expect(deflate({ 'foo-bar': { baz: [{ biz: ['value1', 'value2'] }] } }, ''))
7+
.toStrictEqual(['foo-bar.baz[0].biz[0]=value1', 'foo-bar.baz[0].biz[1]=value2']);
8+
});
89

9-
describe('deflates large json', () => {
10-
expect(deflate({
11-
cloud: {
12-
gateway: {
13-
routes: [
14-
{
15-
id: 'after_route',
16-
uri: 'https://example.org',
17-
predicates: [
18-
{
19-
name: 'Cookie',
20-
args: {
21-
name: 'mycookie',
22-
regexp: 'mycookievalue',
10+
it('deflates large json', () => {
11+
expect(deflate({
12+
cloud: {
13+
gateway: {
14+
routes: [
15+
{
16+
id: 'after_route',
17+
uri: 'https://example.org',
18+
predicates: [
19+
{
20+
name: 'Cookie',
21+
args: {
22+
name: 'mycookie',
23+
regexp: 'mycookievalue',
24+
},
2325
},
24-
},
25-
],
26-
},
27-
],
26+
],
27+
},
28+
],
29+
},
2830
},
29-
},
30-
}, ''))
31-
.toStrictEqual(
32-
['cloud.gateway.routes[0].id=after_route',
33-
'cloud.gateway.routes[0].uri=https://example.org',
34-
'cloud.gateway.routes[0].predicates[0].name=Cookie',
35-
'cloud.gateway.routes[0].predicates[0].args.name=mycookie',
36-
'cloud.gateway.routes[0].predicates[0].args.regexp=mycookievalue']);
31+
}, ''))
32+
.toStrictEqual(
33+
['cloud.gateway.routes[0].id=after_route',
34+
'cloud.gateway.routes[0].uri=https://example.org',
35+
'cloud.gateway.routes[0].predicates[0].name=Cookie',
36+
'cloud.gateway.routes[0].predicates[0].args.name=mycookie',
37+
'cloud.gateway.routes[0].predicates[0].args.regexp=mycookievalue']);
38+
});
3739
});

0 commit comments

Comments
 (0)