Skip to content

Commit

Permalink
Fix typo in EKS versions and add unit test (rancher#11217)
Browse files Browse the repository at this point in the history
* Fix typo in EKS versions and add unit test

* Fix lint
  • Loading branch information
nwmac authored Jun 12, 2024
1 parent fff5729 commit 2efe75f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions pkg/eks/assets/data/__tests__/eks-versions.tests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import eksVersions from '../eks-versions';

const EKS_VERSION_REGEX = /^[0-9]+\.[0-9]+$/;

describe('eks versions', () => {
it('should be valid version numbers', () => {
eksVersions.forEach((version) => {
const m = version.match(EKS_VERSION_REGEX);

expect(m).toBeDefined();
expect(m).not.toBeNull();
expect(m?.length).toBe(1);
expect(m?.[0]).toBe(version);
});
});
});
2 changes: 1 addition & 1 deletion pkg/eks/assets/data/eks-versions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default ['[1.29',
export default ['1.29',

'1.28',

Expand Down

0 comments on commit 2efe75f

Please sign in to comment.