Skip to content

Commit

Permalink
additional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
waterim committed Sep 25, 2023
1 parent 189f2b9 commit 7c18da2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tests/unit/EmojiTest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'underscore';
import moment from 'moment';
import {getUnixTime} from 'date-fns';
import Onyx from 'react-native-onyx';
import lodashGet from 'lodash/get';
import Emoji from '../../assets/emojis';
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('EmojiTest', () => {

return waitForBatchedUpdates().then(() => {
// When add a new emoji
const currentTime = moment().unix();
const currentTime = getUnixTime(new Date());
const smileEmoji = {code: '😄', name: 'smile'};
const newEmoji = [smileEmoji];
User.updateFrequentlyUsedEmojis(EmojiUtils.getFrequentlyUsedEmojis(newEmoji));
Expand Down Expand Up @@ -254,7 +254,7 @@ describe('EmojiTest', () => {

return waitForBatchedUpdates().then(() => {
// When add an emoji that exists in the list
const currentTime = moment().unix();
const currentTime = getUnixTime(new Date());
const newEmoji = [smileEmoji];
User.updateFrequentlyUsedEmojis(EmojiUtils.getFrequentlyUsedEmojis(newEmoji));

Expand Down Expand Up @@ -296,7 +296,7 @@ describe('EmojiTest', () => {

return waitForBatchedUpdates().then(() => {
// When add multiple emojis that either exist or not exist in the list
const currentTime = moment().unix();
const currentTime = getUnixTime(new Date());
const newEmoji = [smileEmoji, zzzEmoji, impEmoji];
User.updateFrequentlyUsedEmojis(EmojiUtils.getFrequentlyUsedEmojis(newEmoji));

Expand Down Expand Up @@ -467,7 +467,7 @@ describe('EmojiTest', () => {

return waitForBatchedUpdates().then(() => {
// When add new emojis
const currentTime = moment().unix();
const currentTime = getUnixTime(new Date());
const newEmoji = [bookEmoji, smileEmoji, zzzEmoji, impEmoji, smileEmoji];
User.updateFrequentlyUsedEmojis(EmojiUtils.getFrequentlyUsedEmojis(newEmoji));

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/createOrUpdateStagingDeployTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @jest-environment node
*/
const core = require('@actions/core');
const moment = require('moment');
const fns = require('date-fns');
const CONST = require('../../.github/libs/CONST');
const GitUtils = require('../../.github/libs/GitUtils');
const GithubUtils = require('../../.github/libs/GithubUtils');
Expand Down Expand Up @@ -168,7 +168,7 @@ describe('createOrUpdateStagingDeployCash', () => {
expect(result).toStrictEqual({
owner: CONST.GITHUB_OWNER,
repo: CONST.APP_REPO,
title: `Deploy Checklist: New Expensify ${moment().format('YYYY-MM-DD')}`,
title: `Deploy Checklist: New Expensify ${fns.format(new Date(), 'yyyy-MM-dd')}`,
labels: [CONST.LABELS.STAGING_DEPLOY],
html_url: 'https://github.com/Expensify/App/issues/29',
assignees: [CONST.APPLAUSE_BOT],
Expand Down

0 comments on commit 7c18da2

Please sign in to comment.