test: add space before init

This commit is contained in:
Sidharth Vinod 2023-03-31 00:18:53 +05:30
parent 48d267c6dc
commit d16894daf4
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD

View File

@ -29,6 +29,7 @@ graph TD
%% This is another comment
%%{init: {'theme': 'forest'}}%%
%%{ init: {'theme': 'space before init'}}%%
%%{init: {'theme': 'space after ending'}}%%
graph TD
A-->B
@ -37,17 +38,18 @@ graph TD
%% This is a comment
`;
expect(cleanupComments(text)).toMatchInlineSnapshot(`
"
"
%%{init: {'theme': 'forest'}}%%
%%{init: {'theme': 'space after ending'}}%%
graph TD
A-->B
%%{init: {'theme': 'forest'}}%%
%%{ init: {'theme': 'space before init'}}%%
%%{init: {'theme': 'space after ending'}}%%
graph TD
A-->B
B-->C
B-->C
"
`);
"
`);
});
it('should remove indented comments', () => {