Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Prune obsolete test code
  • Loading branch information
rotu committed Sep 6, 2023
commit 1fe105873e7d49d215fd10d6669735c4c1c535a6
9 changes: 0 additions & 9 deletions workspaces/config/test/definitions/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const t = require('tap')
const config = require('../../lib/definitions/index.js')
const definitions = require('../../lib/definitions/definitions.js')
const mockGlobals = require('@npmcli/mock-globals')

t.test('defaults', t => {
// just spot check a few of these to show that we got defaults assembled
Expand All @@ -14,10 +13,6 @@ t.test('defaults', t => {
})

t.test('flatten', t => {
// cant use mockGlobals since its not a configurable property
require.main.filename = '/path/to/npm'
mockGlobals(t, { process: { execPath: '/path/to/node', 'env.NODE': undefined } })

const obj = {
'save-exact': true,
'save-prefix': 'ignored',
Expand All @@ -36,10 +31,6 @@ t.test('flatten', t => {
'//foo.bar.com:_authToken': 'foobarbazquuxasdf',
})

mockGlobals(t, {
'process.env.NODE': '/usr/local/bin/node.exe',
})

// now flatten something else on top of it.
config.flatten({ 'save-dev': false }, flat)

Expand Down