diff --git a/react-packager/src/Server/__tests__/Server-test.js b/react-packager/src/Server/__tests__/Server-test.js index 6d841d91..640da7eb 100644 --- a/react-packager/src/Server/__tests__/Server-test.js +++ b/react-packager/src/Server/__tests__/Server-test.js @@ -362,7 +362,7 @@ describe('processRequest', () => { server.processRequest(req, res); jest.runAllTimers(); expect(AssetServer.prototype.get).toBeCalledWith('imgs/a.png', 'ios'); - expect(res.end).toBeCalledWith(mockData.slice(0, 3)); + expect(res.end).toBeCalledWith(mockData.slice(0, 4)); }); }); diff --git a/react-packager/src/Server/index.js b/react-packager/src/Server/index.js index 751c3891..87db0787 100644 --- a/react-packager/src/Server/index.js +++ b/react-packager/src/Server/index.js @@ -407,7 +407,7 @@ class Server { 'Content-Type': mime.lookup(path.basename(assetPath[1])) }); - return data.slice(dataStart, dataEnd); + return data.slice(dataStart, dataEnd + 1); } return data;