Skip to content

Commit

Permalink
chore: update node to current #trivial (#9513)
Browse files Browse the repository at this point in the history
* update node to current

* just check toast is shown
  • Loading branch information
brainbicycle authored Oct 31, 2023
1 parent 66a7213 commit 7517986
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ commands:
steps:
- node/install:
install-yarn: true
node-version: "20.8.1"
node-version: "20.9.0"
generate-checksums:
steps:
- run:
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
deploy-nightly-beta:
executor:
name: node/default
tag: "20.8.1"
tag: "20.9.0"
resource_class: small

steps:
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
parallelism: 8
executor:
name: node/default
tag: "20.8.1"
tag: "20.9.0"
resource_class: large
steps:
- checkout
Expand All @@ -241,7 +241,7 @@ jobs:
update-metaphysics:
executor:
name: node/default
tag: "20.8.1"
tag: "20.9.0"
resource_class: medium
steps:
- checkout
Expand All @@ -256,7 +256,7 @@ jobs:
check-code:
executor:
name: node/default
tag: "20.8.1"
tag: "20.9.0"
resource_class: small
steps:
- checkout
Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
build-test-js:
executor:
name: node/default
tag: "20.8.1"
tag: "20.9.0"
resource_class: medium
steps:
- checkout
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.8.1
20.9.0
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodejs 20.8.1
nodejs 20.9.0
ruby 2.7.8
java zulu-11.58.15
21 changes: 10 additions & 11 deletions src/app/Scenes/Inbox/Components/Conversations/Messages.tests.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Flex, Text } from "@artsy/palette-mobile"
import { Text } from "@artsy/palette-mobile"
import { MessagesTestsQuery } from "__generated__/MessagesTestsQuery.graphql"
import { ToastComponent } from "app/Components/Toast/ToastComponent"
import { extractText } from "app/utils/tests/extractText"
import { renderWithWrappersLEGACY } from "app/utils/tests/renderWithWrappers"
import { RefreshControl } from "react-native"
Expand All @@ -26,12 +27,14 @@ jest.mock("@react-native-community/netinfo", () => {
let env: ReturnType<typeof createMockEnvironment>

beforeEach(() => {
jest.useFakeTimers({
legacyFakeTimers: true,
})
jest.useFakeTimers({ legacyFakeTimers: true })
env = createMockEnvironment()
})

afterEach(() => {
jest.useRealTimers()
})

const onRefresh = jest.fn()

const TestRenderer = () => (
Expand Down Expand Up @@ -129,8 +132,7 @@ describe("messages with order updates", () => {
expect(extractText(tree.root)).toMatch("You sent an offer for")
})

it("shows the toast message and fades out after 5 seconds", () => {
jest.useFakeTimers({ legacyFakeTimers: true })
it("shows a toast message", () => {
const tree = withConversationItems(getWrapper, {
events: [
{
Expand All @@ -147,11 +149,8 @@ describe("messages with order updates", () => {
"To be covered by the Artsy Guarantee, always communicate and pay through the Artsy platform."
)

const toast = tree.root.findAllByType(Flex)[0]
jest.advanceTimersByTime(5000)
expect(toast.props.opacity).toBe(1)
jest.advanceTimersByTime(900000) // this number is weird, but i guess once Toast is moved to reanimated, this should be easier to use a much smaller number?
expect(toast.props.opacity).toBe(0)
const toast = tree.root.findAllByType(ToastComponent)[0]
expect(toast).toBeDefined()
})

it("sorts interleaved items by date", () => {
Expand Down

0 comments on commit 7517986

Please sign in to comment.