From 0c8506591a912340e944af0cf26904066852479c Mon Sep 17 00:00:00 2001 From: Elliott Marquez Date: Tue, 17 Apr 2018 16:49:00 -0700 Subject: [PATCH] manually add assetpath (import.meta.url) for tests that require it --- test/unit/sub/resolveurl-elements.js | 4 +++- test/unit/sub/style-import.js | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/test/unit/sub/resolveurl-elements.js b/test/unit/sub/resolveurl-elements.js index 0812929e87..f82193096a 100644 --- a/test/unit/sub/resolveurl-elements.js +++ b/test/unit/sub/resolveurl-elements.js @@ -12,9 +12,11 @@ import { html } from '../../../lib/utils/html-tag.js'; import { PolymerElement } from '../../../polymer-element.js'; import { DomModule } from '../../../lib/elements/dom-module.js'; import { Polymer } from '../../../lib/legacy/polymer-fn.js'; +import { pathFromUrl } from '../utils/resolve-url.js'; const $_documentContainer = document.createElement('div'); $_documentContainer.setAttribute('style', 'display: none;'); -$_documentContainer.innerHTML = ``; +const baseAssetPath = pathFromUrl(import.meta.url); +$_documentContainer.innerHTML = ``; document.head.appendChild($_documentContainer); class PR extends PolymerElement { static get template() { diff --git a/test/unit/sub/style-import.js b/test/unit/sub/style-import.js index 3273a2c312..95fbcd5fe9 100644 --- a/test/unit/sub/style-import.js +++ b/test/unit/sub/style-import.js @@ -1,7 +1,9 @@ +import { pathFromUrl } from '../utils/resolve-url.js'; + const $_documentContainer = document.createElement('div'); $_documentContainer.setAttribute('style', 'display: none;'); - -$_documentContainer.innerHTML = ` +const baseAssetPath = pathFromUrl(import.meta.url); +$_documentContainer.innerHTML = ` - +