From c5b362472637a8bf12034ce5600316bb67849f5e Mon Sep 17 00:00:00 2001 From: David Sudia Date: Tue, 26 Dec 2017 13:35:59 -0700 Subject: [PATCH] import() causing TS to throw method on type error --- exercises/acronym/acronym.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exercises/acronym/acronym.test.ts b/exercises/acronym/acronym.test.ts index e42a47dd2..4c476dd08 100644 --- a/exercises/acronym/acronym.test.ts +++ b/exercises/acronym/acronym.test.ts @@ -1,8 +1,11 @@ -import Acronym from './acronym' +import Acronym from './acronym.example' describe('Acronym are produced from', () => { it('title cased phrases', () => { - expect(Acronym.parse('Portable Network Graphics')).toEqual('PNG') + return async function getModule() { + const Acronym = await import('./acronym.example') || await import ('./acronym') + expect(Acronym.parse('Portable Network Graphics')).toEqual('PNG') + } }) xit('other title cased phrases', () => {