diff options
Diffstat (limited to 'node_modules/typographic-single-spaces/test.js')
| -rw-r--r-- | node_modules/typographic-single-spaces/test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/typographic-single-spaces/test.js b/node_modules/typographic-single-spaces/test.js new file mode 100644 index 0000000..c36281d --- /dev/null +++ b/node_modules/typographic-single-spaces/test.js @@ -0,0 +1,15 @@ +import singleSpaces from './index'; +import { equal } from 'assert'; + +it('should fix double spaces', ()=> { + equal(singleSpaces(`foo bar`), `foo bar`); +}); + +it('should fix double spaces after punctuation', ()=> { + equal(singleSpaces(`foo. Bar`), `foo. Bar`); + equal(singleSpaces(`foo, bar`), `foo, bar`); +}); + +it('should fix multiply spaces', ()=> { + equal(singleSpaces(`foo bar`), `foo bar`); +}); |