fix: unit test
This commit is contained in:
		
							parent
							
								
									921f3aadc9
								
							
						
					
					
						commit
						f4ec4da68b
					
				| @ -286,6 +286,9 @@ | ||||
|     "watchTriggerable": true, | ||||
|     "watchWithFilter": true, | ||||
|     "whenever": true, | ||||
|     "toValue": true | ||||
|     "toValue": true, | ||||
|     "injectLocal": true, | ||||
|     "provideLocal": true, | ||||
|     "useClipboardItems": true | ||||
|   } | ||||
| } | ||||
|  | ||||
							
								
								
									
										9
									
								
								auto-imports.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								auto-imports.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -36,6 +36,7 @@ declare global { | ||||
|   const h: typeof import('vue')['h'] | ||||
|   const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] | ||||
|   const inject: typeof import('vue')['inject'] | ||||
|   const injectLocal: typeof import('@vueuse/core')['injectLocal'] | ||||
|   const isDefined: typeof import('@vueuse/core')['isDefined'] | ||||
|   const isProxy: typeof import('vue')['isProxy'] | ||||
|   const isReactive: typeof import('vue')['isReactive'] | ||||
| @ -65,6 +66,7 @@ declare global { | ||||
|   const onUpdated: typeof import('vue')['onUpdated'] | ||||
|   const pausableWatch: typeof import('@vueuse/core')['pausableWatch'] | ||||
|   const provide: typeof import('vue')['provide'] | ||||
|   const provideLocal: typeof import('@vueuse/core')['provideLocal'] | ||||
|   const reactify: typeof import('@vueuse/core')['reactify'] | ||||
|   const reactifyObject: typeof import('@vueuse/core')['reactifyObject'] | ||||
|   const reactive: typeof import('vue')['reactive'] | ||||
| @ -128,6 +130,7 @@ declare global { | ||||
|   const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation'] | ||||
|   const useCached: typeof import('@vueuse/core')['useCached'] | ||||
|   const useClipboard: typeof import('@vueuse/core')['useClipboard'] | ||||
|   const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems'] | ||||
|   const useCloned: typeof import('@vueuse/core')['useCloned'] | ||||
|   const useColorMode: typeof import('@vueuse/core')['useColorMode'] | ||||
|   const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog'] | ||||
| @ -326,6 +329,7 @@ declare module 'vue' { | ||||
|     readonly h: UnwrapRef<typeof import('vue')['h']> | ||||
|     readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']> | ||||
|     readonly inject: UnwrapRef<typeof import('vue')['inject']> | ||||
|     readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']> | ||||
|     readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']> | ||||
|     readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> | ||||
|     readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']> | ||||
| @ -355,6 +359,7 @@ declare module 'vue' { | ||||
|     readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> | ||||
|     readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']> | ||||
|     readonly provide: UnwrapRef<typeof import('vue')['provide']> | ||||
|     readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']> | ||||
|     readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']> | ||||
|     readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']> | ||||
|     readonly reactive: UnwrapRef<typeof import('vue')['reactive']> | ||||
| @ -418,6 +423,7 @@ declare module 'vue' { | ||||
|     readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']> | ||||
|     readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']> | ||||
|     readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']> | ||||
|     readonly useClipboardItems: UnwrapRef<typeof import('@vueuse/core')['useClipboardItems']> | ||||
|     readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']> | ||||
|     readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']> | ||||
|     readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']> | ||||
| @ -610,6 +616,7 @@ declare module '@vue/runtime-core' { | ||||
|     readonly h: UnwrapRef<typeof import('vue')['h']> | ||||
|     readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']> | ||||
|     readonly inject: UnwrapRef<typeof import('vue')['inject']> | ||||
|     readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']> | ||||
|     readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']> | ||||
|     readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> | ||||
|     readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']> | ||||
| @ -639,6 +646,7 @@ declare module '@vue/runtime-core' { | ||||
|     readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> | ||||
|     readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']> | ||||
|     readonly provide: UnwrapRef<typeof import('vue')['provide']> | ||||
|     readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']> | ||||
|     readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']> | ||||
|     readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']> | ||||
|     readonly reactive: UnwrapRef<typeof import('vue')['reactive']> | ||||
| @ -702,6 +710,7 @@ declare module '@vue/runtime-core' { | ||||
|     readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']> | ||||
|     readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']> | ||||
|     readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']> | ||||
|     readonly useClipboardItems: UnwrapRef<typeof import('@vueuse/core')['useClipboardItems']> | ||||
|     readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']> | ||||
|     readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']> | ||||
|     readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']> | ||||
|  | ||||
| @ -6,18 +6,18 @@ describe('ipv4/6 util', () => { | ||||
|     it('returns cidr', () => { | ||||
|       expect(parseAsCIDR('1.1.1.1/6')).to.eql('1.1.1.1/6'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('172.16.2.2/16')).to.eql('172.16.2.2/16'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('1a:b:c::d:e:f/ffff:ffff:f4ff:ffff:ffff:ff5f:ffff:ff00')).to.eql(''); // NOSONAR
 | ||||
|       expect(parseAsCIDR('1a:b:c::d:e:f/ffff:ffff:f4ff:ffff:ffff:ff5f:ffff:ff00')).to.eql(undefined); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.1.2.3/255.255.255.252')).to.eql('10.1.2.0/30'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.*.0.*')).to.eql(''); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.*.0.*')).to.eql(undefined); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.1.0.*')).to.eql('10.1.0.0/24'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.2.*.*')).to.eql('10.2.0.0/16'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('a:b:0:8000::/ffff:ffff:ffff:8000::')).to.eql('a:b:0:8000::/49'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('::/::')).to.eql('::/0'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.20.30.64-10.20.30.127')).to.eql('10.20.30.64/26'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.0.128.0/255.0.128.0')).to.eql(''); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.0.128.0/255.0.128.0')).to.eql(undefined); // NOSONAR
 | ||||
|       expect(parseAsCIDR('a::bc:1234/128')).to.eql('a::bc:1234/128'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('a::bc:ff00-a::bc:ff0f')).to.eql('a::bc:ff00/124'); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.0.1.1/255.255.1.0')).to.eql(''); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.0.1.1/255.255.1.0')).to.eql(undefined); // NOSONAR
 | ||||
|       expect(parseAsCIDR('10.0.0.0/255.255.0.0')).to.eql('10.0.0.0/16'); // NOSONAR
 | ||||
|     }); | ||||
|   }); // NOSONAR
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user