Explorar el Código

mock api

bubble
RVKen hace 7 años
padre
commit
9e8007398a
Se han modificado 3 ficheros con 10 adiciones y 3 borrados
  1. +3
    -1
      package.json
  2. +5
    -0
      test/e2e/db.json
  3. +2
    -2
      test/e2e/specs/1.json

+ 3
- 1
package.json Ver fichero

@@ -34,7 +34,8 @@
"just-test": "karma start --config karma.conf.js",
"just-test-in-node": "mocha --recursive --compilers js:babel-core/register test/core test/components test/bugs test/swagger-ui-dist-package",
"e2e": "nightwatch test/e2e/scenarios --config test/e2e/nightwatch.json --verbose",
"e2e-initial-render": "nightwatch test/e2e/scenarios --config test/e2e/nightwatch.json --group initial-render"
"e2e-initial-render": "nightwatch test/e2e/scenarios --config test/e2e/nightwatch.json --group initial-render",
"mock:api": "json-server --watch test/e2e/db.json --port 3204"
},
"dependencies": {
"base64-js": "^1.2.0",
@@ -105,6 +106,7 @@
"html-webpack-plugin": "^2.29.0",
"imports-loader": "0.7.1",
"json-loader": "0.5.4",
"json-server": "^0.11.0",
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",


+ 5
- 0
test/e2e/db.json Ver fichero

@@ -0,0 +1,5 @@
{
"pet": [
{"id":1,"category":{"id":0,"name":"string"},"name":"doggie","photoUrls":["string"],"tags":[{"id":0,"name":"string"}],"status":"available"}
]
}

+ 2
- 2
test/e2e/specs/1.json Ver fichero

@@ -13,8 +13,8 @@
"url":"http://www.apache.org/licenses/LICENSE-2.0.html"
}
},
"host":"petstore.swagger.io",
"basePath":"/v2",
"host":"localhost:3204",
"basePath":"/",
"tags":[
{
"name":"pet",


Cargando…
Cancelar
Guardar