From 5262a99bfe2c8b9bb11120bc04d3874baae5c534 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Tue, 21 Jul 2026 13:09:57 +0100 Subject: [PATCH] drop yarn pnp tests --- tests/pnp-tests.js | 72 ---------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 tests/pnp-tests.js diff --git a/tests/pnp-tests.js b/tests/pnp-tests.js deleted file mode 100644 index a019dcc..0000000 --- a/tests/pnp-tests.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const execSync = require('child_process').execSync; -const { Project } = require('fixturify-project'); -const skipWindows = require('./utils/skip-window'); -const buildVersionCheckerBin = require('./utils/version-checker-bin'); - -class PnPProject extends Project { - constructor() { - super(...arguments); - this.pkg.private = true; - this.pkg.installConfig = { - pnp: true, - }; - } - - toJSON() { - if (this.name !== 'test-project') { - return {}; - } - - const json = super.toJSON(...arguments); - const own = json[this.name]; - delete own['node_modules']; - return json; - } -} - -skipWindows('with yarn pnp', function () { - this.timeout(600000); - let project; - beforeEach(async function () { - project = new PnPProject('test-project'); - - project.addDependency('ember-source-channel-url', '1.1.0'); - project.addDependency('ember-cli-version-checker', `link:${__dirname}/../`); - project.files['index.js'] = buildVersionCheckerBin(`{ - root: process.cwd(), - isEmberCLIProject() {}, - }`); - - await project.write(); - - execSync('yarn', { - cwd: project.baseDir, - }); - }); - - afterEach(function () { - project.dispose(); - }); - - it('finds packages that are present', function () { - const result = execSync( - 'node -r ./.pnp.js ./index.js ember-source-channel-url', - { - cwd: project.baseDir, - } - ); - - assert.strictEqual(result.toString(), 'ember-source-channel-url: 1.1.0\n'); - }); - - it('does not find packages that are missing', function () { - const result = execSync('node -r ./.pnp.js ./index.js blah-blah-blah', { - cwd: project.baseDir, - }); - - assert.strictEqual(result.toString(), 'blah-blah-blah: undefined\n'); - }); -});