mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
wip: migrate to bun
This commit is contained in:
10
test/replace.spec.ts
Normal file
10
test/replace.spec.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import assert from 'node:assert';
|
||||
import replace from '../src/replace';
|
||||
|
||||
describe('replace', () => {
|
||||
it('should replace the matched pattern', () => {
|
||||
const string = 'abcde';
|
||||
assert.strictEqual(replace(string, 'de', '123'), 'abc123');
|
||||
assert.strictEqual(replace(string, /[bd]/g, '-'), 'a-c-e');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user