Skip to content

Commit ee8b99b

Browse files
committed
test: add seeded snapshot test
1 parent b0d28bd commit ee8b99b

2 files changed

Lines changed: 149 additions & 0 deletions

File tree

test/__snapshots__/system.spec.ts.snap

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,48 @@ exports[`system > 42 > fileType 1`] = `"image"`;
2424

2525
exports[`system > 42 > mimeType 1`] = `"application/vnd.ibm.rights-management"`;
2626

27+
exports[`system > 42 > networkInterface > noArgs 1`] = `"wlp1s7"`;
28+
29+
exports[`system > 42 > networkInterface > with 1`] = `"wlp1s7"`;
30+
31+
exports[`system > 42 > networkInterface > with interfaceSchema index 1`] = `"wlo7"`;
32+
33+
exports[`system > 42 > networkInterface > with interfaceSchema mac 1`] = `"wlxcf2bc9927210"`;
34+
35+
exports[`system > 42 > networkInterface > with interfaceSchema pci 1`] = `"wlp9s1"`;
36+
37+
exports[`system > 42 > networkInterface > with interfaceSchema slot 1`] = `"wls7d7"`;
38+
39+
exports[`system > 42 > networkInterface > with interfaceType en 1`] = `"ens7d7"`;
40+
41+
exports[`system > 42 > networkInterface > with interfaceType en interfaceSchema index 1`] = `"eno3"`;
42+
43+
exports[`system > 42 > networkInterface > with interfaceType en interfaceSchema mac 1`] = `"enx5cf2bc992721"`;
44+
45+
exports[`system > 42 > networkInterface > with interfaceType en interfaceSchema pci 1`] = `"P7enp9s1"`;
46+
47+
exports[`system > 42 > networkInterface > with interfaceType en interfaceSchema slot 1`] = `"ens3"`;
48+
49+
exports[`system > 42 > networkInterface > with interfaceType wl 1`] = `"wls7d7"`;
50+
51+
exports[`system > 42 > networkInterface > with interfaceType wl interfaceSchema index 1`] = `"wlo3"`;
52+
53+
exports[`system > 42 > networkInterface > with interfaceType wl interfaceSchema mac 1`] = `"wlx5cf2bc992721"`;
54+
55+
exports[`system > 42 > networkInterface > with interfaceType wl interfaceSchema pci 1`] = `"P7wlp9s1"`;
56+
57+
exports[`system > 42 > networkInterface > with interfaceType wl interfaceSchema slot 1`] = `"wls3"`;
58+
59+
exports[`system > 42 > networkInterface > with interfaceType ww 1`] = `"wws7d7"`;
60+
61+
exports[`system > 42 > networkInterface > with interfaceType ww interfaceSchema index 1`] = `"wwo3"`;
62+
63+
exports[`system > 42 > networkInterface > with interfaceType ww interfaceSchema mac 1`] = `"wwx5cf2bc992721"`;
64+
65+
exports[`system > 42 > networkInterface > with interfaceType ww interfaceSchema pci 1`] = `"P7wwp9s1"`;
66+
67+
exports[`system > 42 > networkInterface > with interfaceType ww interfaceSchema slot 1`] = `"wws3"`;
68+
2769
exports[`system > 42 > semver 1`] = `"3.7.9"`;
2870

2971
exports[`system > 1211 > commonFileExt 1`] = `"htm"`;
@@ -50,6 +92,48 @@ exports[`system > 1211 > fileType 1`] = `"x-shader"`;
5092

5193
exports[`system > 1211 > mimeType 1`] = `"text/vnd.dmclientscript"`;
5294

95+
exports[`system > 1211 > networkInterface > noArgs 1`] = `"wws8d1"`;
96+
97+
exports[`system > 1211 > networkInterface > with 1`] = `"wws8d1"`;
98+
99+
exports[`system > 1211 > networkInterface > with interfaceSchema index 1`] = `"wwo4"`;
100+
101+
exports[`system > 1211 > networkInterface > with interfaceSchema mac 1`] = `"wwx7ec32f0a2a3c"`;
102+
103+
exports[`system > 1211 > networkInterface > with interfaceSchema pci 1`] = `"P8wwp7s2f9d6"`;
104+
105+
exports[`system > 1211 > networkInterface > with interfaceSchema slot 1`] = `"wws4"`;
106+
107+
exports[`system > 1211 > networkInterface > with interfaceType en 1`] = `"P8enp7s2f9d6"`;
108+
109+
exports[`system > 1211 > networkInterface > with interfaceType en interfaceSchema index 1`] = `"eno9"`;
110+
111+
exports[`system > 1211 > networkInterface > with interfaceType en interfaceSchema mac 1`] = `"enxe7ec32f0a2a3"`;
112+
113+
exports[`system > 1211 > networkInterface > with interfaceType en interfaceSchema pci 1`] = `"enp4s8d1"`;
114+
115+
exports[`system > 1211 > networkInterface > with interfaceType en interfaceSchema slot 1`] = `"ens9f8"`;
116+
117+
exports[`system > 1211 > networkInterface > with interfaceType wl 1`] = `"P8wlp7s2f9d6"`;
118+
119+
exports[`system > 1211 > networkInterface > with interfaceType wl interfaceSchema index 1`] = `"wlo9"`;
120+
121+
exports[`system > 1211 > networkInterface > with interfaceType wl interfaceSchema mac 1`] = `"wlxe7ec32f0a2a3"`;
122+
123+
exports[`system > 1211 > networkInterface > with interfaceType wl interfaceSchema pci 1`] = `"wlp4s8d1"`;
124+
125+
exports[`system > 1211 > networkInterface > with interfaceType wl interfaceSchema slot 1`] = `"wls9f8"`;
126+
127+
exports[`system > 1211 > networkInterface > with interfaceType ww 1`] = `"P8wwp7s2f9d6"`;
128+
129+
exports[`system > 1211 > networkInterface > with interfaceType ww interfaceSchema index 1`] = `"wwo9"`;
130+
131+
exports[`system > 1211 > networkInterface > with interfaceType ww interfaceSchema mac 1`] = `"wwxe7ec32f0a2a3"`;
132+
133+
exports[`system > 1211 > networkInterface > with interfaceType ww interfaceSchema pci 1`] = `"wwp4s8d1"`;
134+
135+
exports[`system > 1211 > networkInterface > with interfaceType ww interfaceSchema slot 1`] = `"wws9f8"`;
136+
53137
exports[`system > 1211 > semver 1`] = `"9.4.8"`;
54138

55139
exports[`system > 1337 > commonFileExt 1`] = `"wav"`;
@@ -76,6 +160,48 @@ exports[`system > 1337 > fileType 1`] = `"font"`;
76160

77161
exports[`system > 1337 > mimeType 1`] = `"application/vnd.chipnuts.karaoke-mmd"`;
78162

163+
exports[`system > 1337 > networkInterface > noArgs 1`] = `"enx234870538945"`;
164+
165+
exports[`system > 1337 > networkInterface > with 1`] = `"enx234870538945"`;
166+
167+
exports[`system > 1337 > networkInterface > with interfaceSchema index 1`] = `"eno5"`;
168+
169+
exports[`system > 1337 > networkInterface > with interfaceSchema mac 1`] = `"enx823487053894"`;
170+
171+
exports[`system > 1337 > networkInterface > with interfaceSchema pci 1`] = `"enp1s2f5d0"`;
172+
173+
exports[`system > 1337 > networkInterface > with interfaceSchema slot 1`] = `"ens5f2d5"`;
174+
175+
exports[`system > 1337 > networkInterface > with interfaceType en 1`] = `"ens5f2d5"`;
176+
177+
exports[`system > 1337 > networkInterface > with interfaceType en interfaceSchema index 1`] = `"eno2"`;
178+
179+
exports[`system > 1337 > networkInterface > with interfaceType en interfaceSchema mac 1`] = `"enx482348705389"`;
180+
181+
exports[`system > 1337 > networkInterface > with interfaceType en interfaceSchema pci 1`] = `"P5enp1s2f5d0"`;
182+
183+
exports[`system > 1337 > networkInterface > with interfaceType en interfaceSchema slot 1`] = `"ens2d2"`;
184+
185+
exports[`system > 1337 > networkInterface > with interfaceType wl 1`] = `"wls5f2d5"`;
186+
187+
exports[`system > 1337 > networkInterface > with interfaceType wl interfaceSchema index 1`] = `"wlo2"`;
188+
189+
exports[`system > 1337 > networkInterface > with interfaceType wl interfaceSchema mac 1`] = `"wlx482348705389"`;
190+
191+
exports[`system > 1337 > networkInterface > with interfaceType wl interfaceSchema pci 1`] = `"P5wlp1s2f5d0"`;
192+
193+
exports[`system > 1337 > networkInterface > with interfaceType wl interfaceSchema slot 1`] = `"wls2d2"`;
194+
195+
exports[`system > 1337 > networkInterface > with interfaceType ww 1`] = `"wws5f2d5"`;
196+
197+
exports[`system > 1337 > networkInterface > with interfaceType ww interfaceSchema index 1`] = `"wwo2"`;
198+
199+
exports[`system > 1337 > networkInterface > with interfaceType ww interfaceSchema mac 1`] = `"wwx482348705389"`;
200+
201+
exports[`system > 1337 > networkInterface > with interfaceType ww interfaceSchema pci 1`] = `"P5wwp1s2f5d0"`;
202+
203+
exports[`system > 1337 > networkInterface > with interfaceType ww interfaceSchema slot 1`] = `"wws2d2"`;
204+
79205
exports[`system > 1337 > semver 1`] = `"2.5.1"`;
80206

81207
exports[`system > seed: 42 > commonFileExt() 1`] = `"png"`;

test/system.spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,29 @@ describe('system', () => {
4747
t.describe('fileExt', (t) => {
4848
t.it('noArgs').it('with mimeType', 'application/json');
4949
});
50+
51+
t.describe('networkInterface', (t) => {
52+
t.it('noArgs');
53+
for (const interfaceSchema of [
54+
undefined,
55+
'index',
56+
'slot',
57+
'mac',
58+
'pci',
59+
] as const) {
60+
for (const interfaceType of [undefined, 'en', 'wl', 'ww'] as const) {
61+
t.it(
62+
`with${interfaceType ? ` interfaceType ${interfaceType}` : ''}${
63+
interfaceSchema ? ` interfaceSchema ${interfaceSchema}` : ''
64+
}`,
65+
{
66+
interfaceType,
67+
interfaceSchema,
68+
}
69+
);
70+
}
71+
}
72+
});
5073
});
5174

5275
for (const seed of seededRuns) {

0 commit comments

Comments
 (0)