test: use snapshot for host-rules

This commit is contained in:
Rhys Arkins 2021-05-06 14:43:11 +02:00
parent 89ad6401d9
commit fc48bdf738
2 changed files with 11 additions and 1 deletions

View file

@ -35,3 +35,13 @@ Array [
"yet.another.local.registry",
]
`;
exports[`util/host-rules findAll() needs exact host matches 1`] = `
Object {
"hostName": "nuget.org",
"hostType": "nuget",
"password": "p4$$w0rd",
"resolvedHost": "nuget.org",
"username": "root",
}
`;

View file

@ -205,7 +205,7 @@ describe(getName(), () => {
};
add(hostRule);
expect(findAll({ hostType: 'nuget' })).toHaveLength(1);
expect(findAll({ hostType: 'nuget' })[0]).toMatchObject(hostRule);
expect(findAll({ hostType: 'nuget' })[0]).toMatchSnapshot();
});
});
});