From 17117bdda8308c28fe61e4e6d3b1a0721419e6a1 Mon Sep 17 00:00:00 2001 From: xarxziux Date: Fri, 10 Aug 2018 18:20:38 +0100 Subject: [PATCH] Fix unit tests for Alphametics exercise As per issue #436: - Change default import `solve` to named import `{ solve }`. - Change export statement of example.js from a default to a named export. --- exercises/alphametics/alphametics.spec.js | 2 +- exercises/alphametics/example.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/alphametics/alphametics.spec.js b/exercises/alphametics/alphametics.spec.js index 41698d13f3..674241f28e 100644 --- a/exercises/alphametics/alphametics.spec.js +++ b/exercises/alphametics/alphametics.spec.js @@ -1,4 +1,4 @@ -import solve from './alphametics'; +import { solve } from './alphametics'; describe('Solve the alphametics puzzle', () => { test('puzzle with three letters', () => { diff --git a/exercises/alphametics/example.js b/exercises/alphametics/example.js index 5a76270e84..472f792846 100644 --- a/exercises/alphametics/example.js +++ b/exercises/alphametics/example.js @@ -1,4 +1,4 @@ -export default function solve(puzzle) { +export function solve(puzzle) { const parts = puzzle .split(/[+|==]/g) .map(o => o.trim())