Skip to content

Commit

Permalink
Use single quote.
Browse files Browse the repository at this point in the history
  • Loading branch information
charliecm committed Apr 20, 2021
1 parent 6cd52ad commit 6fb2bdb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/tidyFootnotes.test.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import tidyFootnotes from './tidyFootnotes';
import * as CodeMirror from "codemirror";
import * as CodeMirror from 'codemirror';

function getValue(text: string): string {
let doc = CodeMirror.Doc(text);
tidyFootnotes(doc);
return doc.getValue().trim();
}

test("No footnotes should not change anything", () => {
let value = getValue("Hello world!");
expect(value).toBe("Hello world!");
test('No footnotes should not change anything', () => {
let value = getValue('Hello world!');
expect(value).toBe('Hello world!');
});

test("Footnote markers without definitions should add empty definitions at the end", () => {
let value = getValue("[^1][^2]");
test('Footnote markers without definitions should add empty definitions at the end', () => {
let value = getValue('[^1][^2]');
expect(value).toBe(`[^1][^2]
[^1]:
[^2]:`);
});

test("Footnotes should be re-numbered consecutively", () => {
test('Footnotes should be re-numbered consecutively', () => {
let value = getValue(`a[^1]b
[^3]c[^2]d
Expand All @@ -35,14 +35,14 @@ test("Footnotes should be re-numbered consecutively", () => {
[^3]:`);
});

test("Definitions without a marker should remain the same", () => {
test('Definitions without a marker should remain the same', () => {
let value = getValue(`[^1]: A
[^2]: B`);
expect(value).toBe(`[^1]: A
[^2]: B`);
});

test("Multi-line definitions should stay together", () => {
test('Multi-line definitions should stay together', () => {
let value = getValue(`Start
[^2]: A
\tB
Expand Down

0 comments on commit 6fb2bdb

Please sign in to comment.