From c23c558122eb2515ccbb2ac27e35d9395ff0f2d9 Mon Sep 17 00:00:00 2001
From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Date: Mon, 19 Feb 2024 22:31:26 -0500
Subject: [PATCH] Remove skipped tests that have been skipped for years
---
.../tests/rendering/compile-js-test.gts | 149 +-----------------
1 file changed, 1 insertion(+), 148 deletions(-)
diff --git a/packages/ember-repl/test-app/tests/rendering/compile-js-test.gts b/packages/ember-repl/test-app/tests/rendering/compile-js-test.gts
index 479fc59ab..1ce7a42a5 100644
--- a/packages/ember-repl/test-app/tests/rendering/compile-js-test.gts
+++ b/packages/ember-repl/test-app/tests/rendering/compile-js-test.gts
@@ -1,5 +1,5 @@
import { click, render } from '@ember/test-helpers';
-import { module, skip, test } from 'qunit';
+import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { compileJS } from 'ember-repl/formats/gjs';
@@ -127,151 +127,4 @@ module('compileJS()', function (hooks) {
assert.dom().hasText('Custom extra module');
});
-
- module('in AMD / requirejs environments (old-style)', function () {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- if ((window as any).require) {
- skip('can optionally import from npm via skypack', async function (assert) {
- assert.expect(4);
-
- let compile = async () => {
- let template = `
- import { Changeset as createChangeset } from 'validated-changeset';
-
- let changeset = createChangeset({});
-
-
- {{changeset.isValid}}
- {{changeset.isPristine}}
-
- `;
-
- let { component, name, error } = await compileJS(template, {}, { skypack: true });
-
- assert.ok(error);
- assert.notOk(name);
- assert.ok(/using native ESM is not allowed/.test(error?.toString() || ''));
-
- return component;
- };
-
- await render(
-
- {{#let (compile) as |CustomComponent|}}
-
- {{/let}}
-
- );
-
- assert.dom('a').doesNotExist();
- });
-
- skip('can import from the skypack CDN', async function (assert) {
- assert.expect(4);
-
- let compile = async () => {
- let template = `
- import { Changeset as createChangeset } from 'https://cdn.skypack.dev/validated-changeset';
-
- let changeset = createChangeset({});
-
-
- {{changeset.isValid}}
- {{changeset.isPristine}}
-
- `;
-
- let { component, name, error } = await compileJS(template, {}, { skypack: true });
-
- assert.ok(error);
- assert.notOk(name);
- assert.ok(/using native ESM is not allowed/.test(error?.toString() || ''));
-
- return component;
- };
-
- await render(
-
- {{#let (compile) as |CustomComponent|}}
-
- {{/let}}
-
- );
-
- assert.dom('a').doesNotExist();
- });
- }
- });
-
- module('in ESM environments', function () {
- skip('can optionally import from npm via skypack', async function (assert) {
- assert.expect(4);
-
- let compile = async () => {
- let template = `
- import { Changeset as createChangeset } from 'validated-changeset';
-
- let changeset = createChangeset({});
-
-
- {{changeset.isValid}}
- {{changeset.isPristine}}
-
- `;
-
- let { component, name, error } = await compileJS(template, {}, { skypack: true });
-
- assert.notOk(error);
- assert.ok(name);
-
- return component;
- };
-
- await render(
-
- {{#let (compile) as |CustomComponent|}}
-
- {{/let}}
-
- );
-
- assert.dom('a').hasText('true');
- assert.dom('b').hasText('true');
- });
-
- skip('can import from a CDN', async function (assert) {
- assert.expect(4);
-
- let compile = async () => {
- let template = `
- import { Changeset as createChangeset } from 'https://esm.run/validated-changeset';
-
- let changeset = createChangeset({});
-
-
- {{changeset.isValid}}
- {{changeset.isPristine}}
-
- `;
-
- let { component, name, error } = await compileJS(template, {}, { skypack: true });
-
- assert.notOk(error);
- assert.ok(name);
-
- return component;
- };
-
- await render(
-
- {{#let (compile) as |CustomComponent|}}
-
- {{/let}}
-
- );
-
- assert.dom('a').hasText('true');
- assert.dom('b').hasText('true');
- });
- });
});