mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-31 17:19:56 +08:00
feat: special ip address 'localhost' (#2935)
This commit is contained in:
+5
-3
@@ -4,9 +4,11 @@ import { isValidIPAddress } from '../is-valid-ip-address';
|
||||
|
||||
describe('isValidIpAddress', () => {
|
||||
test('should return true for valid IP address', () => {
|
||||
['115.42.150.37', '192.168.0.1', '110.234.52.124'].forEach(ip => {
|
||||
expect(isValidIPAddress(ip)).toBe(true);
|
||||
});
|
||||
['115.42.150.37', '192.168.0.1', '110.234.52.124', 'localhost'].forEach(
|
||||
ip => {
|
||||
expect(isValidIPAddress(ip)).toBe(true);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
test('should return false for invalid IP address', () => {
|
||||
|
||||
Reference in New Issue
Block a user