Skip to content

Commit

Permalink
fix the importing of the change-case module
Browse files Browse the repository at this point in the history
  • Loading branch information
yuheiy committed Feb 18, 2022
1 parent 8002364 commit 7c922b8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# drygen

## 0.0.5 (2022-02-19)

### BUG FIXES

- fix the importing of the `change-case` module

## 0.0.4 (2021-07-03)

### BUG FIXES
Expand Down
2 changes: 1 addition & 1 deletion src/output.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import changeCase from "change-case";
import * as changeCase from "change-case";
import ejs from "ejs";
import { promises as fsPromises } from "fs";
import normalizePath from "normalize-path";
Expand Down
11 changes: 11 additions & 0 deletions test/output.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,16 @@ baz
const expected = "dependencies/test.html";
assert.equal(actual, expected);
});

it("camelCase()", function () {
const outputEntry = new OutputEntry(fixturesDir, "test", {
path: "output.txt",
template: "output.txt.ejs",
});
const { camelCase } = outputEntry.defaultTemplateData;
const actual = camelCase("my-button");
const expected = "myButton";
assert.equal(actual, expected);
});
});
});

0 comments on commit 7c922b8

Please sign in to comment.