IP地址无效化
This commit is contained in:
6
test/string/defanging-an-ip-address.test.js
Normal file
6
test/string/defanging-an-ip-address.test.js
Normal file
@ -0,0 +1,6 @@
|
||||
import { defangIPaddr } from '../../src/string/defanging-an-ip-address'
|
||||
|
||||
test('IP地址无效化', () => {
|
||||
expect(defangIPaddr('1.1.1.1')).toBe('1[.]1[.]1[.]1')
|
||||
expect(defangIPaddr('255.100.50.0')).toBe('255[.]100[.]50[.]0')
|
||||
})
|
Reference in New Issue
Block a user