Skip to content

Commit

Permalink
feat(ch10): fix a parameter in a function
Browse files Browse the repository at this point in the history
  • Loading branch information
poulzinho committed Jan 18, 2020
1 parent 0680927 commit 5a62be7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {assert, expect} from 'chai';
import {add} from "./10.1_abstraction_and_composition";

describe("Abstraction and Composition", () => {
it("should fix a parameter in a function", () => {

const a = add(1, 1);
const b = add(a, 1);

expect(b).to.equal(3);
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const add = (a, b) => a + b;

0 comments on commit 5a62be7

Please sign in to comment.