Skip to content
Snippets Groups Projects
Commit 72d79c59 authored by Millicent Billette's avatar Millicent Billette
Browse files

WiP: multi-node-layer & test-e2e

parent c77116ba
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@
"test:dev:runTests": "ava src/**.test.mjs",
"test:dev:duplication": "jscpd ./ -s",
"xtest:dev:complexity": "codehawk ./",
"test-e2e": "ava src/**.test-e2e.mjs",
"test:production": "run-s test:production:**",
"xtest:production:qualityCheck": "xo",
"test:production:duplication": "jscpd ./",
......@@ -29,7 +30,8 @@
"test:production:complexity:badgesAndThreshold": "node CI/plato-badges.js",
"test:production:srcCoverage": "cd generated/cov-env/ && c8 ava",
"test:production:testMinified": "cd generated/minified/ && ava",
"test:production:clean": "rm -rf generated/minified/*.test.mjs",
"test:production:test-e2e": "cd generated/minified/ && ava **.test-e2e.mjs",
"test:production:clean": "rm -rf generated/minified/*.test*.mjs",
"test:production:minified2npm": "cp -rf generated/minified/* generated/npm/",
"watch": "chokidar src/* -c \"npm run test:dev:runTests\"",
"watch2null": "chokidar src/* -c \"npm run test:dev:runTests 2>/dev/null\""
......
import test from 'ava';
import * as app from './data-pod-client.mjs';
test('data-pod-client real server request', async t => {
const hosts = ['https://g1.data.e-is.pro/'];
const query = 'user/profile/2sZF6j2PkxBDNAqUde7Dgo5x3crkerZpQ4rBqqJGn8QT?&_source=title';
const expectedResult = JSON.parse(`{
"_index":"user","_type":"profile","_id":"2sZF6j2PkxBDNAqUde7Dgo5x3crkerZpQ4rBqqJGn8QT","_version":11,
"found":true,
"_source":{"title":"[1000i100] Millicent BILLETTE"}
}`);
const client = new app.DataPodClient(hosts);
const result = await client.query(query);
t.is(result._source.title, expectedResult._source.title);
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment