This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: sync API incorrectly required
relativePath
option
- `options` should be optional for sync methods too. - TODO: add API interface tests for other APIs BREAKING: CLI argument `relative` renamed to `relativePath`
- Loading branch information
James Ramsay
committed
Jan 30, 2016
1 parent
fc593d2
commit a1dc8b5
Showing
5 changed files
with
70 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import test from 'ava'; | ||
|
||
import { transcludeFileSync } from '../../lib/hercule'; | ||
|
||
let major; | ||
let minor; | ||
|
||
[major, minor] = process.versions.node.split('.'); | ||
|
||
if (major < 1 && minor < 12) { | ||
test.only(`synchronous support not available < 0.12`, (t) => { | ||
t.pass(); | ||
}); | ||
} | ||
|
||
test(`should transclude with only required arguments`, (t) => { | ||
const input = '../test/fixtures/no-link/index.md'; | ||
const expected = 'The quick brown fox jumps over the lazy dog.\n'; | ||
const output = transcludeFileSync(input); | ||
t.same(output, expected); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import test from 'ava'; | ||
|
||
import { transcludeStringSync } from '../../lib/hercule'; | ||
|
||
let major; | ||
let minor; | ||
|
||
[major, minor] = process.versions.node.split('.'); | ||
|
||
if (major < 1 && minor < 12) { | ||
test.only(`synchronous support not available < 0.12`, (t) => { | ||
t.pass(); | ||
}); | ||
} | ||
|
||
test(`should transclude with only required arguments`, (t) => { | ||
const input = 'The quick brown fox jumps over the lazy dog.'; | ||
const expected = 'The quick brown fox jumps over the lazy dog.'; | ||
const output = transcludeStringSync(input); | ||
t.same(output, expected); | ||
}); |