mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
18 lines
598 B
JavaScript
18 lines
598 B
JavaScript
|
import ServerContext from '../src/context'
|
||
|
|
||
|
describe('server: ServerContext', () => {
|
||
|
test('should construct context', () => {
|
||
|
const server = {
|
||
|
nuxt: { id: 'test-contest-nuxt' },
|
||
|
globals: { id: 'test-contest-globals' },
|
||
|
options: { id: 'test-contest-options' },
|
||
|
resources: { id: 'test-contest-resources' }
|
||
|
}
|
||
|
const context = new ServerContext(server)
|
||
|
expect(context.nuxt).toBe(server.nuxt)
|
||
|
expect(context.globals).toEqual(server.globals)
|
||
|
expect(context.options).toEqual(server.options)
|
||
|
expect(context.resources).toEqual(server.resources)
|
||
|
})
|
||
|
})
|