From b9a56fe8812a40482cf86d5d596c4b867504abeb Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 13 Oct 2022 00:05:10 +0200 Subject: [PATCH] Update tests to include Matcher. --- tests/redirect.test.ts | 9 +++++++-- tests/snapshots/tests/redirect.test.ts.md | 2 ++ tests/snapshots/tests/redirect.test.ts.snap | Bin 378 -> 406 bytes 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/redirect.test.ts b/tests/redirect.test.ts index ae7b89b..c1a108e 100644 --- a/tests/redirect.test.ts +++ b/tests/redirect.test.ts @@ -6,16 +6,19 @@ import { parseRedirect, HostnameRedirect, Redirect, + Redirects, RedirectParameters, } from '../source/redirect/exports.js'; test('parseRedirect', (t) => { - const samples: RedirectParameters[] = [ + const samples: Array = [ { test: 'Invalid parameters', - } as unknown as RedirectParameters, + } as unknown as Redirects['parameters'], { hostname: 'example.org', + matchType: 'hostname', + toMatch: 'example.com', type: 'hostname', }, ]; @@ -33,6 +36,8 @@ test('parseRedirect', (t) => { test('Redirect.redirect', (t) => { const hostnameRedirect = new HostnameRedirect({ + matchType: 'hostname', + toMatch: 'example.com', hostname: 'example.org', type: 'hostname', }); diff --git a/tests/snapshots/tests/redirect.test.ts.md b/tests/snapshots/tests/redirect.test.ts.md index 0cb63b1..b16a179 100644 --- a/tests/snapshots/tests/redirect.test.ts.md +++ b/tests/snapshots/tests/redirect.test.ts.md @@ -11,6 +11,8 @@ Generated by [AVA](https://avajs.dev). HostnameRedirect { parameters: { hostname: 'example.org', + matchType: 'hostname', + toMatch: 'example.com', type: 'hostname', }, } diff --git a/tests/snapshots/tests/redirect.test.ts.snap b/tests/snapshots/tests/redirect.test.ts.snap index 57ab73d03756bb94b7b6c70928f926025845541f..7c856b1204ee428c79d2da0766f8288a7b4a4776 100644 GIT binary patch literal 406 zcmV;H0crk0RzVc4y)Ql!I^qF2XHvXo8R(#6qMeJI?pM`1ie+n}Lwgou17ZCMZ~%QKi{Aixb5n zO!SCmnoHEvc^p%uSFl$jEs{Ub25;A_ho-vF48T8;8b>t!?gj{;c{aE;Ti^EytPlVK zs{q%gr3W?U9HMF!#DaD9iOfu$lTgn#7(_HJAMl!Xeb*%DZf)1E?I2Kgvbvvsf{&D%G%{%MmlZABMk^b;@h8xIF6FT_)sk!K$`g z&IQAJ6~pu&7&a>y!i*x{;8gRY@jX+M17sTi26L=(uqvwpcH4pd1h?cUVO;|N05v$h AO8@`> literal 378 zcmV-=0fqiSRzVCVIPYK00000000B6kTFifFcgOU5-3#>kf=QX5(`rUOb7`WSlE!55Sx=cnt&6h z_5;zem6$jMG7;pKWjc<3!C`Ni%Q^Fs!6MN zjb;@(LKHkk@pK`$*1K(-CZMT3kChYBq6z8!S4jSmS?i!go5+pFA(ASe|;SeI1;d+5M^12d;t)c*ni0MAvb0{{R3