Content-Length: 298868 | pFad | https://github.com/Flet/github-slugger/commit/41e501811f7cf65614fe8455cbfbe01449582802

7C Update tests a bit · Flet/github-slugger@41e5018 · GitHub
Skip to content

Commit 41e5018

Browse files
committed
Update tests a bit
1 parent be5f1c6 commit 41e5018

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const fixtures = JSON.parse(
99
))
1010
)
1111

12-
test('simple stuff', function (t) {
12+
test('basic', function (t) {
1313
const slugger = new GithubSlugger()
1414

1515
// @ts-expect-error: not allowed by types but handled gracefully in the code.
@@ -19,13 +19,15 @@ test('simple stuff', function (t) {
1919
t.equals(slugger.slug('fooCamelCase', true), 'fooCamelCase', 'should support `maintainCase`') // foocamelcase
2020
t.equals(slugger.slug('fooCamelCase'), 'foocamelcase', 'should support `maintainCase` (reference)') // foocamelcase-1
2121

22+
t.equals(slugger.slug('asd'), 'asd', 'should slug')
23+
t.equals(slugger.slug('asd'), 'asd-1', 'should create unique slugs for repeated values')
24+
2225
t.end()
2326
})
2427

2528
test('static method', function (t) {
26-
t.equals(slug('foo'), 'foo')
27-
t.equals(slug('foo bar'), 'foo-bar')
28-
t.equals(slug('foo'), 'foo') // idem potent
29+
t.equals(slug('foo'), 'foo', 'should slug')
30+
t.equals(slug('foo'), 'foo', 'should create same slugs for repeated values')
2931
t.end()
3032
})
3133

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/Flet/github-slugger/commit/41e501811f7cf65614fe8455cbfbe01449582802

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy