Skip to content

Commit

Permalink
test: add non-escapable character
Browse files Browse the repository at this point in the history
  • Loading branch information
hosseinmd committed Mar 24, 2022
1 parent b14397c commit 33afeb7
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 560 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
},
"devDependencies": {
"@commitlint/config-conventional": "^14.1.0",
"@react-native-community/eslint-config": "^3.0.1",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@types/jest": "^27.0.2",
"@types/mdast": "^3.0.10",
Expand Down Expand Up @@ -63,4 +62,4 @@
"engines": {
"node": ">=12.0.0"
}
}
}
14 changes: 14 additions & 0 deletions tests/__snapshots__/main.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,20 @@ exports[`jsdoc tags 1`] = `
"
`;
exports[`non-escapable character 1`] = `
"/**
* \\\\
*
* \\\\-
*/
"
`;
exports[`non-escapable character 2`] = `
"/** \\\\ */
"
`;
exports[`param order 1`] = `
"/**
* @param {string} param0 Description
Expand Down
21 changes: 21 additions & 0 deletions tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,3 +683,24 @@ test("Optional params", () => {

expect(result).toMatchSnapshot();
});

test("non-escapable character", () => {
const result = subject(`
/**
* \\\\
*
*
* \\\\-
*/
`);

expect(result).toMatchSnapshot();

const result2 = subject(`
/**
* \\\\
*/
`);

expect(result2).toMatchSnapshot();
});
Loading

0 comments on commit 33afeb7

Please sign in to comment.