From 05589eed48bfaf1de022e02a49d7099b4cfa21cd Mon Sep 17 00:00:00 2001 From: Precious Onyenaucheya Date: Fri, 8 Dec 2023 09:53:01 +0000 Subject: [PATCH] revert changes to test --- src/components/external-link/_macro.spec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/external-link/_macro.spec.js b/src/components/external-link/_macro.spec.js index b26fdc44ce..4491108957 100644 --- a/src/components/external-link/_macro.spec.js +++ b/src/components/external-link/_macro.spec.js @@ -68,10 +68,10 @@ describe('macro: external-link', () => { expect($('.ons-external-link__new-window-description').text()).toBe('(custom opens in a new tab text)'); }); - it('has `external link` icon', () => { - const faker = templateFaker(); - const iconsSpy = faker.spy('icon'); - faker.renderComponent('external-link', EXAMPLE_EXTERNAL_LINK); - expect(iconsSpy.occurrences[0].iconType).toBe('external-link'); + it('has an "external-link" icon', async () => { + const $ = cheerio.load(renderComponent('external-link', EXAMPLE_EXTERNAL_LINK)); + + const $svg = $('.ons-external-link__icon svg'); + expect($svg.length).toBe(1); }); });