From 291803c31f829fe0d32bb3207bc11def95a7408c Mon Sep 17 00:00:00 2001 From: Nevena Bojovic Date: Tue, 1 Mar 2022 20:05:50 +0100 Subject: Urađena test aplikacija. Povezan front i back. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../node_modules/node-gyp/test/test-install.js | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sandbox/testAppNevena/Front/node_modules/node-gyp/test/test-install.js (limited to 'sandbox/testAppNevena/Front/node_modules/node-gyp/test/test-install.js') diff --git a/sandbox/testAppNevena/Front/node_modules/node-gyp/test/test-install.js b/sandbox/testAppNevena/Front/node_modules/node-gyp/test/test-install.js new file mode 100644 index 00000000..5039dc99 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/node-gyp/test/test-install.js @@ -0,0 +1,46 @@ +'use strict' + +const { test } = require('tap') +const { test: { install } } = require('../lib/install') +const log = require('npmlog') + +log.level = 'error' // we expect a warning + +test('EACCES retry once', async (t) => { + t.plan(3) + + const fs = { + promises: { + stat (_) { + const err = new Error() + err.code = 'EACCES' + t.ok(true) + throw err + } + } + } + + const Gyp = { + devDir: __dirname, + opts: { + ensure: true + }, + commands: { + install (argv, cb) { + install(fs, Gyp, argv).then(cb, cb) + }, + remove (_, cb) { + cb() + } + } + } + + try { + await install(fs, Gyp, []) + } catch (err) { + t.ok(true) + if (/"pre" versions of node cannot be installed/.test(err.message)) { + t.ok(true) + } + } +}) -- cgit v1.2.3