Skip to content

Commit 7093eff

Browse files
committed
add missing test
1 parent b4bbc71 commit 7093eff

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { strictEqual } from 'node:assert';
2+
import { describe, it } from 'node:test';
3+
4+
import { createNodeSlugger } from '../utils/slugger.mjs';
5+
6+
describe('createNodeSlugger', () => {
7+
it('should create a new instance of the GitHub Slugger', () => {
8+
const slugger = createNodeSlugger();
9+
strictEqual(typeof slugger.slug, 'function');
10+
strictEqual(typeof slugger.reset, 'function');
11+
});
12+
13+
it('should create a new slug based on the provided string', () => {
14+
const slugger = createNodeSlugger();
15+
strictEqual(slugger.slug('Test'), 'test');
16+
});
17+
18+
it('should reset the cache of the Slugger', () => {
19+
const slugger = createNodeSlugger();
20+
slugger.reset();
21+
});
22+
});

0 commit comments

Comments
 (0)