mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
refactor(namespace): migrate namespace edit to react [r8s-125] (#38)
This commit is contained in:
parent
40c7742e46
commit
ce7e0d8d60
108 changed files with 3183 additions and 2194 deletions
17
app/react/kubernetes/namespaces/resourceQuotaUtils.test.ts
Normal file
17
app/react/kubernetes/namespaces/resourceQuotaUtils.test.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { parseCPU } from './resourceQuotaUtils';
|
||||
|
||||
// test parseCPU with '', '2', '100m', '100u'
|
||||
describe('parseCPU', () => {
|
||||
it('should return 0 for empty string', () => {
|
||||
expect(parseCPU('')).toBe(0);
|
||||
});
|
||||
it('should return 2 for 2', () => {
|
||||
expect(parseCPU('2')).toBe(2);
|
||||
});
|
||||
it('should return 0.1 for 100m', () => {
|
||||
expect(parseCPU('100m')).toBe(0.1);
|
||||
});
|
||||
it('should return 0.0001 for 100u', () => {
|
||||
expect(parseCPU('100u')).toBe(0.0001);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue