-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0c43aba
commit 8a7bd2c
Showing
5 changed files
with
91 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { suite, test, before, after } from 'node:test'; | ||
import { once } from 'node:events'; | ||
import { Fixture } from './util.js'; | ||
|
||
suite('Next.js v15 - Node.js v18', async () => { | ||
const ctx = {}; | ||
|
||
before(async () => { | ||
ctx.fixture = new Fixture({ nextMajor: '15', nodeMajor: '18' }); | ||
await once(ctx.fixture, 'ready'); | ||
ctx.rest = `http://${ctx.fixture.portMap.get('9926')}`; | ||
}); | ||
|
||
await test('should run base component', async (t) => { | ||
const response = await fetch(`${ctx.rest}/Dog/0`, { | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Authorization': 'Basic aGRiX2FkbWluOnBhc3N3b3Jk', | ||
}, | ||
}); | ||
const json = await response.json(); | ||
|
||
t.assert.deepStrictEqual(json, { id: '0', name: 'Lincoln', breed: 'Shepherd' }); | ||
}); | ||
|
||
after(() => { | ||
ctx.fixture.cleanup(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
import { suite, test, before, after } from 'node:test'; | ||
import { deepStrictEqual } from 'node:assert'; | ||
import { once } from 'node:events'; | ||
import { Fixture } from './util.js'; | ||
|
||
suite('Next.js v15 - Node.js v20', (t) => { | ||
before(async () => { | ||
t.fixture = new Fixture({ nextMajor: 15, nodeMajor: 20 }); | ||
suite('Next.js v15 - Node.js v20', async () => { | ||
const ctx = {}; | ||
|
||
await once(t.fixture, 'ready'); | ||
before(async () => { | ||
ctx.fixture = new Fixture({ nextMajor: '15', nodeMajor: '20' }); | ||
await once(ctx.fixture, 'ready'); | ||
ctx.rest = `http://${ctx.fixture.portMap.get('9926')}`; | ||
}); | ||
|
||
test('should run base component', async (t) => { | ||
const response = await fetch('http://localhost:9926/Dog/0', { | ||
await test('should run base component', async (t) => { | ||
const response = await fetch(`${ctx.rest}/Dog/0`, { | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Authorization': 'Basic aGRiX2FkbWluOnBhc3N3b3Jk', | ||
}, | ||
}); | ||
const json = await response.json(); | ||
|
||
deepStrictEqual(json, { id: '0', name: 'Lincoln', breed: 'Shepherd' }); | ||
t.assert.deepStrictEqual(json, { id: '0', name: 'Lincoln', breed: 'Shepherd' }); | ||
}); | ||
|
||
after(() => { | ||
t.fixture.cleanup(); | ||
ctx.fixture.cleanup(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { suite, test, before, after } from 'node:test'; | ||
import { once } from 'node:events'; | ||
import { Fixture } from './util.js'; | ||
|
||
suite('Next.js v15 - Node.js v22', async () => { | ||
const ctx = {}; | ||
|
||
before(async () => { | ||
ctx.fixture = new Fixture({ nextMajor: '15', nodeMajor: '22' }); | ||
await once(ctx.fixture, 'ready'); | ||
ctx.rest = `http://${ctx.fixture.portMap.get('9926')}`; | ||
}); | ||
|
||
await test('should run base component', async (t) => { | ||
const response = await fetch(`${ctx.rest}/Dog/0`, { | ||
headers: { | ||
'Content-Type': 'application/json', | ||
'Authorization': 'Basic aGRiX2FkbWluOnBhc3N3b3Jk', | ||
}, | ||
}); | ||
const json = await response.json(); | ||
|
||
t.assert.deepStrictEqual(json, { id: '0', name: 'Lincoln', breed: 'Shepherd' }); | ||
}); | ||
|
||
after(() => { | ||
ctx.fixture.cleanup(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters