Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion __tests__/unit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
'use strict'

const path = require('path')

const awsServerlessExpress = require('../src/index')

test('getPathWithQueryStringParams: no params', () => {
Expand Down Expand Up @@ -92,7 +95,9 @@ test('mapApiGatewayEventToHttpRequest: without headers', () => {

test('getSocketPath', () => {
const socketPath = awsServerlessExpress.getSocketPath('12345abcdef')
expect(socketPath).toEqual('/tmp/server-12345abcdef.sock')
const isWin = process.platform === 'win32'
const expectedSocketPath = isWin ? path.join('\\\\?\\\\pipe\\\\', process.cwd(), 'server-12345abcdef') : '/tmp/server-12345abcdef.sock'
expect(socketPath).toBe(expectedSocketPath)
})

const PassThrough = require('stream').PassThrough
Expand Down