diff --git a/test/dom/as.mocha.js b/test/dom/as.mocha.js index 0c322601..5dd46d66 100644 --- a/test/dom/as.mocha.js +++ b/test/dom/as.mocha.js @@ -1,9 +1,19 @@ var expect = require('chai').expect; -var derby = require('./util').derby; +var domTestRunner = require('../../src/test-utils/domTestRunner'); describe('as', function() { + var runner = domTestRunner.install({ + jsdomOptions: { + // solution for `SecurityError: localStorage is not available for opaque origins` + // Racer interfaces with localStorage and the `as-object` tests use `page.model` + // methods causing the SecurityError if `url` is not set. Does not appear to impact + // `as-array` tests even though they also use `pae.model` methods so 🤷 + url: 'http://localhost/' + } + }); + it('HTML element `as` property', function() { - var app = derby.createApp(); + const { app } = runner.createHarness(); app.views.register('Body', '
'); var page = app.createPage(); var fragment = page.getFragment('Body'); @@ -12,7 +22,7 @@ describe('as', function() { }); it('Component `as` property', function() { - var app = derby.createApp(); + const { app } = runner.createHarness(); app.views.register('Body', ''); app.views.register('item', '
') function Item() {}; @@ -25,7 +35,7 @@ describe('as', function() { }); it('HTML element `as-object` property', function() { - var app = derby.createApp(); + const { app } = runner.createHarness(); app.views.register('Body', '