Skip to content

Commit

Permalink
test: jsonify options
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Aug 4, 2022
1 parent ee8b99b commit e99d14e
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 69 deletions.
120 changes: 60 additions & 60 deletions test/__snapshots__/system.spec.ts.snap
Expand Up @@ -26,45 +26,45 @@ exports[`system > 42 > mimeType 1`] = `"application/vnd.ibm.rights-management"`;

exports[`system > 42 > networkInterface > noArgs 1`] = `"wlp1s7"`;

exports[`system > 42 > networkInterface > with 1`] = `"wlp1s7"`;
exports[`system > 42 > networkInterface > with {"interfaceSchema":"index"} 1`] = `"wlo7"`;

exports[`system > 42 > networkInterface > with interfaceSchema index 1`] = `"wlo7"`;
exports[`system > 42 > networkInterface > with {"interfaceSchema":"mac"} 1`] = `"wlxcf2bc9927210"`;

exports[`system > 42 > networkInterface > with interfaceSchema mac 1`] = `"wlxcf2bc9927210"`;
exports[`system > 42 > networkInterface > with {"interfaceSchema":"pci"} 1`] = `"wlp9s1"`;

exports[`system > 42 > networkInterface > with interfaceSchema pci 1`] = `"wlp9s1"`;
exports[`system > 42 > networkInterface > with {"interfaceSchema":"slot"} 1`] = `"wls7d7"`;

exports[`system > 42 > networkInterface > with interfaceSchema slot 1`] = `"wls7d7"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"en","interfaceSchema":"index"} 1`] = `"eno3"`;

exports[`system > 42 > networkInterface > with interfaceType en 1`] = `"ens7d7"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"en","interfaceSchema":"mac"} 1`] = `"enx5cf2bc992721"`;

exports[`system > 42 > networkInterface > with interfaceType en interfaceSchema index 1`] = `"eno3"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"en","interfaceSchema":"pci"} 1`] = `"P7enp9s1"`;

exports[`system > 42 > networkInterface > with interfaceType en interfaceSchema mac 1`] = `"enx5cf2bc992721"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"en","interfaceSchema":"slot"} 1`] = `"ens3"`;

exports[`system > 42 > networkInterface > with interfaceType en interfaceSchema pci 1`] = `"P7enp9s1"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"en"} 1`] = `"ens7d7"`;

exports[`system > 42 > networkInterface > with interfaceType en interfaceSchema slot 1`] = `"ens3"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"index"} 1`] = `"wlo3"`;

exports[`system > 42 > networkInterface > with interfaceType wl 1`] = `"wls7d7"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"mac"} 1`] = `"wlx5cf2bc992721"`;

exports[`system > 42 > networkInterface > with interfaceType wl interfaceSchema index 1`] = `"wlo3"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"pci"} 1`] = `"P7wlp9s1"`;

exports[`system > 42 > networkInterface > with interfaceType wl interfaceSchema mac 1`] = `"wlx5cf2bc992721"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"slot"} 1`] = `"wls3"`;

exports[`system > 42 > networkInterface > with interfaceType wl interfaceSchema pci 1`] = `"P7wlp9s1"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"wl"} 1`] = `"wls7d7"`;

exports[`system > 42 > networkInterface > with interfaceType wl interfaceSchema slot 1`] = `"wls3"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"index"} 1`] = `"wwo3"`;

exports[`system > 42 > networkInterface > with interfaceType ww 1`] = `"wws7d7"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"mac"} 1`] = `"wwx5cf2bc992721"`;

exports[`system > 42 > networkInterface > with interfaceType ww interfaceSchema index 1`] = `"wwo3"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"pci"} 1`] = `"P7wwp9s1"`;

exports[`system > 42 > networkInterface > with interfaceType ww interfaceSchema mac 1`] = `"wwx5cf2bc992721"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"slot"} 1`] = `"wws3"`;

exports[`system > 42 > networkInterface > with interfaceType ww interfaceSchema pci 1`] = `"P7wwp9s1"`;
exports[`system > 42 > networkInterface > with {"interfaceType":"ww"} 1`] = `"wws7d7"`;

exports[`system > 42 > networkInterface > with interfaceType ww interfaceSchema slot 1`] = `"wws3"`;
exports[`system > 42 > networkInterface > with {} 1`] = `"wlp1s7"`;

exports[`system > 42 > semver 1`] = `"3.7.9"`;

Expand Down Expand Up @@ -94,45 +94,45 @@ exports[`system > 1211 > mimeType 1`] = `"text/vnd.dmclientscript"`;

exports[`system > 1211 > networkInterface > noArgs 1`] = `"wws8d1"`;

exports[`system > 1211 > networkInterface > with 1`] = `"wws8d1"`;
exports[`system > 1211 > networkInterface > with {"interfaceSchema":"index"} 1`] = `"wwo4"`;

exports[`system > 1211 > networkInterface > with interfaceSchema index 1`] = `"wwo4"`;
exports[`system > 1211 > networkInterface > with {"interfaceSchema":"mac"} 1`] = `"wwx7ec32f0a2a3c"`;

exports[`system > 1211 > networkInterface > with interfaceSchema mac 1`] = `"wwx7ec32f0a2a3c"`;
exports[`system > 1211 > networkInterface > with {"interfaceSchema":"pci"} 1`] = `"P8wwp7s2f9d6"`;

exports[`system > 1211 > networkInterface > with interfaceSchema pci 1`] = `"P8wwp7s2f9d6"`;
exports[`system > 1211 > networkInterface > with {"interfaceSchema":"slot"} 1`] = `"wws4"`;

exports[`system > 1211 > networkInterface > with interfaceSchema slot 1`] = `"wws4"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"en","interfaceSchema":"index"} 1`] = `"eno9"`;

exports[`system > 1211 > networkInterface > with interfaceType en 1`] = `"P8enp7s2f9d6"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"en","interfaceSchema":"mac"} 1`] = `"enxe7ec32f0a2a3"`;

exports[`system > 1211 > networkInterface > with interfaceType en interfaceSchema index 1`] = `"eno9"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"en","interfaceSchema":"pci"} 1`] = `"enp4s8d1"`;

exports[`system > 1211 > networkInterface > with interfaceType en interfaceSchema mac 1`] = `"enxe7ec32f0a2a3"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"en","interfaceSchema":"slot"} 1`] = `"ens9f8"`;

exports[`system > 1211 > networkInterface > with interfaceType en interfaceSchema pci 1`] = `"enp4s8d1"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"en"} 1`] = `"P8enp7s2f9d6"`;

exports[`system > 1211 > networkInterface > with interfaceType en interfaceSchema slot 1`] = `"ens9f8"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"index"} 1`] = `"wlo9"`;

exports[`system > 1211 > networkInterface > with interfaceType wl 1`] = `"P8wlp7s2f9d6"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"mac"} 1`] = `"wlxe7ec32f0a2a3"`;

exports[`system > 1211 > networkInterface > with interfaceType wl interfaceSchema index 1`] = `"wlo9"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"pci"} 1`] = `"wlp4s8d1"`;

exports[`system > 1211 > networkInterface > with interfaceType wl interfaceSchema mac 1`] = `"wlxe7ec32f0a2a3"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"slot"} 1`] = `"wls9f8"`;

exports[`system > 1211 > networkInterface > with interfaceType wl interfaceSchema pci 1`] = `"wlp4s8d1"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"wl"} 1`] = `"P8wlp7s2f9d6"`;

exports[`system > 1211 > networkInterface > with interfaceType wl interfaceSchema slot 1`] = `"wls9f8"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"index"} 1`] = `"wwo9"`;

exports[`system > 1211 > networkInterface > with interfaceType ww 1`] = `"P8wwp7s2f9d6"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"mac"} 1`] = `"wwxe7ec32f0a2a3"`;

exports[`system > 1211 > networkInterface > with interfaceType ww interfaceSchema index 1`] = `"wwo9"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"pci"} 1`] = `"wwp4s8d1"`;

exports[`system > 1211 > networkInterface > with interfaceType ww interfaceSchema mac 1`] = `"wwxe7ec32f0a2a3"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"slot"} 1`] = `"wws9f8"`;

exports[`system > 1211 > networkInterface > with interfaceType ww interfaceSchema pci 1`] = `"wwp4s8d1"`;
exports[`system > 1211 > networkInterface > with {"interfaceType":"ww"} 1`] = `"P8wwp7s2f9d6"`;

exports[`system > 1211 > networkInterface > with interfaceType ww interfaceSchema slot 1`] = `"wws9f8"`;
exports[`system > 1211 > networkInterface > with {} 1`] = `"wws8d1"`;

exports[`system > 1211 > semver 1`] = `"9.4.8"`;

Expand Down Expand Up @@ -162,45 +162,45 @@ exports[`system > 1337 > mimeType 1`] = `"application/vnd.chipnuts.karaoke-mmd"`

exports[`system > 1337 > networkInterface > noArgs 1`] = `"enx234870538945"`;

exports[`system > 1337 > networkInterface > with 1`] = `"enx234870538945"`;
exports[`system > 1337 > networkInterface > with {"interfaceSchema":"index"} 1`] = `"eno5"`;

exports[`system > 1337 > networkInterface > with interfaceSchema index 1`] = `"eno5"`;
exports[`system > 1337 > networkInterface > with {"interfaceSchema":"mac"} 1`] = `"enx823487053894"`;

exports[`system > 1337 > networkInterface > with interfaceSchema mac 1`] = `"enx823487053894"`;
exports[`system > 1337 > networkInterface > with {"interfaceSchema":"pci"} 1`] = `"enp1s2f5d0"`;

exports[`system > 1337 > networkInterface > with interfaceSchema pci 1`] = `"enp1s2f5d0"`;
exports[`system > 1337 > networkInterface > with {"interfaceSchema":"slot"} 1`] = `"ens5f2d5"`;

exports[`system > 1337 > networkInterface > with interfaceSchema slot 1`] = `"ens5f2d5"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"en","interfaceSchema":"index"} 1`] = `"eno2"`;

exports[`system > 1337 > networkInterface > with interfaceType en 1`] = `"ens5f2d5"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"en","interfaceSchema":"mac"} 1`] = `"enx482348705389"`;

exports[`system > 1337 > networkInterface > with interfaceType en interfaceSchema index 1`] = `"eno2"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"en","interfaceSchema":"pci"} 1`] = `"P5enp1s2f5d0"`;

exports[`system > 1337 > networkInterface > with interfaceType en interfaceSchema mac 1`] = `"enx482348705389"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"en","interfaceSchema":"slot"} 1`] = `"ens2d2"`;

exports[`system > 1337 > networkInterface > with interfaceType en interfaceSchema pci 1`] = `"P5enp1s2f5d0"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"en"} 1`] = `"ens5f2d5"`;

exports[`system > 1337 > networkInterface > with interfaceType en interfaceSchema slot 1`] = `"ens2d2"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"index"} 1`] = `"wlo2"`;

exports[`system > 1337 > networkInterface > with interfaceType wl 1`] = `"wls5f2d5"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"mac"} 1`] = `"wlx482348705389"`;

exports[`system > 1337 > networkInterface > with interfaceType wl interfaceSchema index 1`] = `"wlo2"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"pci"} 1`] = `"P5wlp1s2f5d0"`;

exports[`system > 1337 > networkInterface > with interfaceType wl interfaceSchema mac 1`] = `"wlx482348705389"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"wl","interfaceSchema":"slot"} 1`] = `"wls2d2"`;

exports[`system > 1337 > networkInterface > with interfaceType wl interfaceSchema pci 1`] = `"P5wlp1s2f5d0"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"wl"} 1`] = `"wls5f2d5"`;

exports[`system > 1337 > networkInterface > with interfaceType wl interfaceSchema slot 1`] = `"wls2d2"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"index"} 1`] = `"wwo2"`;

exports[`system > 1337 > networkInterface > with interfaceType ww 1`] = `"wws5f2d5"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"mac"} 1`] = `"wwx482348705389"`;

exports[`system > 1337 > networkInterface > with interfaceType ww interfaceSchema index 1`] = `"wwo2"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"pci"} 1`] = `"P5wwp1s2f5d0"`;

exports[`system > 1337 > networkInterface > with interfaceType ww interfaceSchema mac 1`] = `"wwx482348705389"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"ww","interfaceSchema":"slot"} 1`] = `"wws2d2"`;

exports[`system > 1337 > networkInterface > with interfaceType ww interfaceSchema pci 1`] = `"P5wwp1s2f5d0"`;
exports[`system > 1337 > networkInterface > with {"interfaceType":"ww"} 1`] = `"wws5f2d5"`;

exports[`system > 1337 > networkInterface > with interfaceType ww interfaceSchema slot 1`] = `"wws2d2"`;
exports[`system > 1337 > networkInterface > with {} 1`] = `"enx234870538945"`;

exports[`system > 1337 > semver 1`] = `"2.5.1"`;

Expand Down
13 changes: 4 additions & 9 deletions test/system.spec.ts
Expand Up @@ -58,15 +58,10 @@ describe('system', () => {
'pci',
] as const) {
for (const interfaceType of [undefined, 'en', 'wl', 'ww'] as const) {
t.it(
`with${interfaceType ? ` interfaceType ${interfaceType}` : ''}${
interfaceSchema ? ` interfaceSchema ${interfaceSchema}` : ''
}`,
{
interfaceType,
interfaceSchema,
}
);
t.it(`with ${JSON.stringify({ interfaceType, interfaceSchema })}`, {
interfaceType,
interfaceSchema,
});
}
}
});
Expand Down

0 comments on commit e99d14e

Please sign in to comment.