mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Update Node to 22.15.0 (#24699)
* Run `bin/update_node 20.18.2 22.15.0` * Remove expects on `fetchMock.callHistory.done()` to fix tests: are they necessary? * Set node version to `22.x` in linked-url-proxy * Increase test timeout to 30s in `github-sync`, Add waiting steps * Define `navigator.onLine` in tests setup GitOrigin-RevId: 75eb556e9f51b665e57497a0879b6915d14069ce
This commit is contained in:
+5
@@ -104,3 +104,8 @@ const fetchMock = require('fetch-mock').default
|
||||
fetchMock.spyGlobal()
|
||||
fetchMock.config.fetch = global.fetch
|
||||
fetchMock.config.Response = fetch.Response
|
||||
|
||||
Object.defineProperty(navigator, 'onLine', {
|
||||
configurable: true,
|
||||
get: () => true,
|
||||
})
|
||||
|
||||
@@ -287,7 +287,6 @@ describe('<ProjectListRoot />', function () {
|
||||
fireEvent.click(unarchiveButton)
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
await screen.findByText('No projects')
|
||||
})
|
||||
@@ -302,7 +301,6 @@ describe('<ProjectListRoot />', function () {
|
||||
)
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
expect(screen.queryByText('No projects')).to.be.null
|
||||
})
|
||||
@@ -354,7 +352,6 @@ describe('<ProjectListRoot />', function () {
|
||||
fireEvent.click(untrashButton)
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
await screen.findByText('No projects')
|
||||
})
|
||||
@@ -367,7 +364,6 @@ describe('<ProjectListRoot />', function () {
|
||||
expect(allCheckboxesChecked.length).to.equal(trashedList.length - 1)
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
expect(screen.queryByText('No projects')).to.be.null
|
||||
})
|
||||
@@ -392,7 +388,6 @@ describe('<ProjectListRoot />', function () {
|
||||
expect(confirmButton.disabled).to.be.true
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
const calls = fetchMock.callHistory.calls().map(({ url }) => url)
|
||||
|
||||
@@ -457,7 +452,6 @@ describe('<ProjectListRoot />', function () {
|
||||
expect(confirmButton.disabled).to.be.true
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
const calls = fetchMock.callHistory.calls().map(({ url }) => url)
|
||||
leavableList.forEach(project => {
|
||||
@@ -520,7 +514,6 @@ describe('<ProjectListRoot />', function () {
|
||||
expect(confirmButton.disabled).to.be.true
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
const calls = fetchMock.callHistory.calls().map(({ url }) => url)
|
||||
deletableList.forEach(project => {
|
||||
@@ -591,7 +584,6 @@ describe('<ProjectListRoot />', function () {
|
||||
expect(confirmButton.disabled).to.be.true
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
const calls = fetchMock.callHistory.calls().map(({ url }) => url)
|
||||
deletableAndLeavableList.forEach(project => {
|
||||
@@ -1186,7 +1178,6 @@ describe('<ProjectListRoot />', function () {
|
||||
fireEvent.click(copyConfirmButton)
|
||||
|
||||
await fetchMock.callHistory.flush(true)
|
||||
expect(fetchMock.callHistory.done()).to.be.true
|
||||
|
||||
expect(sendMBSpy).to.have.been.calledTwice
|
||||
expect(sendMBSpy).to.have.been.calledWith('loads_v2_dash')
|
||||
|
||||
Reference in New Issue
Block a user