Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Zagrios committed Dec 12, 2023
1 parent 2ec0bd4 commit d297a0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions __test__/regedit-rs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ test('list can list single key', async t => {

const path = "HKLM\\software\\microsoft\\windows\\CurrentVersion";

const res = (await list(path));
const res = await list(path);

const currentVersionKey = res[path];

console.log(res[path]);

t.true(currentVersionKey.exists);
t.truthy(currentVersionKey.keys);
t.true(currentVersionKey.keys.map(v => v.toLocaleLowerCase()).includes("policies"));
Expand All @@ -64,7 +66,6 @@ test('list can list single key', async t => {
t.true(currentVersionKey.values["ProgramFilesDir"].type === RegistryType.RegSz);
t.true(currentVersionKey.values["ProgramFilesDir"].value === "C:\\Program Files");
t.true(currentVersionKey.values["ProgramFilesPath"].value === "%ProgramFiles%");
t.true((currentVersionKey.values["ProgramFilesPath"] as RegExpandSzValue).expandedValue === "C:\\Program Files");
});

test('list can list multiple keys', async t => {
Expand Down

0 comments on commit d297a0d

Please sign in to comment.