vuetestingsuite's People
Forkers
ourstress ironsenpai hongshaoyang mengyuan1 nelsonho1999 dylansee97 julian-cl jordseow justussoh nymanrobin e0053531 kazinyan claradleah minhvuh joshuachoy aeronsimshihwin jitsheng wsyhhh oziomek1 marthayq coldsonata nummia2 thangamanirvuetestingsuite's Issues
Submitting anything in the app leads to HTTP 502
After submitting my editable code, the POST always responds with HTTP 502 Bad Gateway with a "Internal Server Error" message.
Testing the API on the AWS API Gateway console with a POST request body like this:
{
"userToken": "ABCDE",
"shown": {
"0": "//main.spec.js \nconst app = require(\"./main\");\ndescribe(\"Load app from main.js\", () => {\n it(\"has a created hook\", () => {\n expect(typeof app).toBe(\"object\");\n });\n it(\"sets the correct default data\", () => {\n expect(typeof app).toBe(\"object\");\n expect(2).toEqual(2);\n expect(app.user).toEqual(\"Chris\");\n });\n});"
},
"editable": {
"0": "//main.js \nvar app = new Vue({\n el: \"#app\",\n data: {\n user: \"Chris\",\n temp: 95\n }\n});\nmodule.exports = app;"
},
"hidden": {
"0": "{\n \"scripts\": {\n \"test\": \"jest\"\n }\n}"
}
}
leads to this error message:
Sat Oct 05 15:13:25 UTC 2019 : Endpoint response body before transformations: {"errorType":"SyntaxError","errorMessage":"Unexpected end of JSON input","trace":["SyntaxError: Unexpected end of JSON input"," at JSON.parse (<anonymous>)"," at testRunner (/var/task/testRunner.js:87:40)"," at Runtime.exports.handler (/var/task/index.js:25:23)"," at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"," at process._tickCallback (internal/process/next_tick.js:68:7)"]}
Sat Oct 05 15:13:25 UTC 2019 : Lambda execution failed with status 200 due to customer function error: Unexpected end of JSON input. Lambda request id: 7d2d7f6c-c134-4ba2-96ec-90ef55b97146
The offending code in testRunner.js
is this part:
let npmTest = "cd /tmp/example; CI=true npm test";
let npmTestResults = systemSync(npmTest);
let npmTestJSON = "cd /tmp/example; CI=true npm run test-json";
let npmTestJSONResults = systemSync(npmTestJSON);
let finalnpmTestJSONResults = {};
if (typeof npmTestJSONResults === "string") {
let lines = npmTestJSONResults.split("\n");
// remove three lines, starting at the first position
lines.splice(0, 3);
// join the array back into a single string
let newtext = lines.join("\n");
finalnpmTestJSONResults = JSON.parse(newtext);
} else {
finalnpmTestJSONResults = npmTestJSONResults;
}
where the JSON.parse
is not parsing correctly.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.