rusackas commented on PR #34564:
URL: https://github.com/apache/superset/pull/34564#issuecomment-3937671058
## Pre-commit Fix Required
The `lint-frontend` CI job is failing because the test file uses `it()`
instead of `test()`. The oxlint `consistent-test-it` rule requires using
`test()` within `describe()` blocks.
### Fix needed in
`superset-frontend/plugins/legacy-plugin-chart-calendar/test/getFormattedUTCTime.test.ts`:
Replace all three occurrences of `it(` with `test(`:
```diff
describe('getFormattedUTCTime', () => {
- it('formatted date string should equal to UTC date', () => {
+ test('formatted date string should equal to UTC date', () => {
const ts = 1420070400000; // 2015.01.01 00:00:00 UTC
const formattedTime = getFormattedUTCTime(ts, '%Y-%m-%d %H:%M:%S');
expect(formattedTime).toEqual('2015-01-01 00:00:00');
});
- it('should not have day offset for dates near midnight', () => {
+ test('should not have day offset for dates near midnight', () => {
// Test case from issue #28931 - 2024-05-31 should remain 2024-05-31
const ts = new Date('2024-05-31T00:00:00Z').getTime();
const formattedTime = getFormattedUTCTime(ts, '%Y-%m-%d');
expect(formattedTime).toEqual('2024-05-31');
});
- it('should handle different timezones without offset', () => {
+ test('should handle different timezones without offset', () => {
```
### Note about other CI failures:
- The `pre-commit` CI jobs failed due to a "Broken pipe" error during
`helm-docs` installation, which is an infrastructure issue unrelated to your
code.
- Once you apply the fix above and push, the `lint-frontend` check should
pass.
---
*Alternatively, you can enable "Allow edits by maintainers" on this PR so
maintainers can push fixes directly.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]