@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { convertTimeToLocalTimezone } from './components/FailedEntities';
|
||||
import { catalogUnprocessedEntitiesPlugin } from './plugin';
|
||||
|
||||
describe('catalog-unprocessed-entities', () => {
|
||||
@@ -20,3 +21,17 @@ describe('catalog-unprocessed-entities', () => {
|
||||
expect(catalogUnprocessedEntitiesPlugin).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('components/FailedEntities/convertTimeToLocalTimezone', () => {
|
||||
it('should correctly a UTC ISO string to local time', () => {
|
||||
const utcTime = '2024-09-03T08:15:08.088Z';
|
||||
const localTime = convertTimeToLocalTimezone(utcTime);
|
||||
expect(localTime).toBe('2024-09-03 08:15:08 UTC');
|
||||
});
|
||||
|
||||
it('should correctly convert a UTC Date object to local time', () => {
|
||||
const utcTime = new Date('2024-09-03T08:15:08.088Z');
|
||||
const localTime = convertTimeToLocalTimezone(utcTime);
|
||||
expect(localTime).toBe('2024-09-03 08:15:08 UTC');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user