From fc48bdf7389b0e695717217a52adeac0ba5a5977 Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Thu, 6 May 2021 14:43:11 +0200 Subject: [PATCH] test: use snapshot for host-rules --- lib/util/__snapshots__/host-rules.spec.ts.snap | 10 ++++++++++ lib/util/host-rules.spec.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/util/__snapshots__/host-rules.spec.ts.snap b/lib/util/__snapshots__/host-rules.spec.ts.snap index 8bf8dfa34b..615196fffe 100644 --- a/lib/util/__snapshots__/host-rules.spec.ts.snap +++ b/lib/util/__snapshots__/host-rules.spec.ts.snap @@ -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", +} +`; diff --git a/lib/util/host-rules.spec.ts b/lib/util/host-rules.spec.ts index 2593122122..0d8d3af789 100644 --- a/lib/util/host-rules.spec.ts +++ b/lib/util/host-rules.spec.ts @@ -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(); }); }); });