-
Notifications
You must be signed in to change notification settings - Fork 37
[terra-toolkit-docs] Update terra-functional-testing upgrade guide #648
Changes from all commits
5705b49
8747ee5
2ab9bc3
f3a163a
5b2c929
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const ExpressServer = require('./ExpressServer'); | ||
const ExpressServer = require('../../express-server'); | ||
|
||
module.exports = async (options) => { | ||
const server = new ExpressServer({ | ||
|
@@ -7,6 +7,5 @@ module.exports = async (options) => { | |
site: options.site, | ||
}); | ||
|
||
await server.createApp(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the call to createApp() because it is already being called inside start(). This is also to match AssetServerService where calling createApp() is not needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was gonna ask about that :) |
||
await server.start(); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
const mockCreateApp = jest.fn(); | ||
const mockStart = jest.fn(); | ||
jest.mock('../../../../src/terra-cli/express-server/ExpressServer', () => jest.fn().mockImplementation(() => ({ | ||
jest.mock('../../../../src/express-server', () => jest.fn().mockImplementation(() => ({ | ||
createApp: mockCreateApp, | ||
start: mockStart, | ||
}))); | ||
|
||
const expressHandler = require('../../../../src/terra-cli/express-server/expressServerHandler'); | ||
const ExpressServer = require('../../../../src/terra-cli/express-server/ExpressServer'); | ||
const ExpressServer = require('../../../../src/express-server'); | ||
|
||
describe('expressHandler', () => { | ||
it('takes in options and starts the express server', async () => { | ||
await expressHandler({ host: 'host', port: 'port', site: 'site' }); | ||
|
||
expect(ExpressServer).toHaveBeenCalledWith({ host: 'host', port: 'port', site: 'site' }); | ||
expect(mockCreateApp).toHaveBeenCalled(); | ||
expect(mockStart).toHaveBeenCalled(); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
|
||
## Unreleased | ||
|
||
* Removed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically non passive. Though for our uses, I'm not sure if it will affect us since for us most, if not all, packages that use the open source scripts, also use terra-functional testing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I searched in github for all the places that depend on @cerner/terra-open-source-scripts. There are a few but they all already also depend on @cerner/terra-functional-testing so this should continue to work for them. |
||
* Removed express-server CLI command. This is moved to @cerner/terra-functional-testing to eliminate the need to depend on this package to use express-server. | ||
|
||
## 1.8.0 - (April 23, 2021) | ||
|
||
* Changed | ||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will now use the express-server that is currently in terra-functional-testing.