From 514f968c2ff49e3633ab4890c1ddd75ec7f7cc70 Mon Sep 17 00:00:00 2001 From: Simon Legander Date: Mon, 5 Aug 2019 10:26:11 +0200 Subject: [PATCH] Start using scheme for jslib imports. --- src/render/imports.js | 2 +- test/unit/render/imports.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/render/imports.js b/src/render/imports.js index 272748f5..890f8832 100644 --- a/src/render/imports.js +++ b/src/render/imports.js @@ -37,7 +37,7 @@ function http (spec, lines) { } const K6_JS_LIBS = (() => { - const BASE_URL = 'jslib.k6.io' + const BASE_URL = 'https://jslib.k6.io' return { jsonpath: `import jsonpath from "${BASE_URL}/jsonpath/1.0.2/index.js"`, formurlencoded: `import formurlencoded from "${BASE_URL}/form-urlencoded/3.0.0/index.js"` diff --git a/test/unit/render/imports.js b/test/unit/render/imports.js index a55ccc67..34b48ef9 100644 --- a/test/unit/render/imports.js +++ b/test/unit/render/imports.js @@ -34,8 +34,8 @@ test('compat', t => { `import { sleep } from "k6"; -import formurlencoded from "jslib.k6.io/form-urlencoded/3.0.0/index.js" -import jsonpath from "jslib.k6.io/jsonpath/1.0.2/index.js"` +import formurlencoded from "https://jslib.k6.io/form-urlencoded/3.0.0/index.js" +import jsonpath from "https://jslib.k6.io/jsonpath/1.0.2/index.js"` ) }) @@ -54,6 +54,6 @@ test('combined', t => { import http from "k6/http"; -import formurlencoded from "jslib.k6.io/form-urlencoded/3.0.0/index.js" -import jsonpath from "jslib.k6.io/jsonpath/1.0.2/index.js"`) +import formurlencoded from "https://jslib.k6.io/form-urlencoded/3.0.0/index.js" +import jsonpath from "https://jslib.k6.io/jsonpath/1.0.2/index.js"`) })