Skip to content

Commit

Permalink
Export applyPatches from root module
Browse files Browse the repository at this point in the history
Fixes #73
  • Loading branch information
kpdecker committed Sep 9, 2015
1 parent 06ba845 commit 4b6ae49
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {diffSentences} from './diff/sentence';
import {diffCss} from './diff/css';
import {diffJson, canonicalize} from './diff/json';

import {applyPatch} from './patch/apply';
import {applyPatch, applyPatches} from './patch/apply';
import {parsePatch} from './patch/parse';
import {structuredPatch, createTwoFilesPatch, createPatch} from './patch/create';

Expand All @@ -47,6 +47,7 @@ export {
createTwoFilesPatch,
createPatch,
applyPatch,
applyPatches,
parsePatch,
convertChangesToDMP,
convertChangesToXML,
Expand Down
29 changes: 29 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import * as Diff from '../lib';

import {expect} from 'chai';

describe('root exports', function() {
it('should export APIs', function() {
expect(Diff.Diff).to.exist;

expect(Diff.diffChars).to.exist;
expect(Diff.diffWords).to.exist;
expect(Diff.diffWordsWithSpace).to.exist;
expect(Diff.diffLines).to.exist;
expect(Diff.diffTrimmedLines).to.exist;
expect(Diff.diffSentences).to.exist;

expect(Diff.diffCss).to.exist;
expect(Diff.diffJson).to.exist;

expect(Diff.structuredPatch).to.exist;
expect(Diff.createTwoFilesPatch).to.exist;
expect(Diff.createPatch).to.exist;
expect(Diff.applyPatch).to.exist;
expect(Diff.applyPatches).to.exist;
expect(Diff.parsePatch).to.exist;
expect(Diff.convertChangesToDMP).to.exist;
expect(Diff.convertChangesToXML).to.exist;
expect(Diff.canonicalize).to.exist;
});
});

0 comments on commit 4b6ae49

Please sign in to comment.