snipe/web/node_modules/path-browserify/test/test-path-dirname.js
pyr0ball 7a704441a6 feat(snipe): Vue 3 frontend scaffold + Docker web service
- web/: Vue 3 + Vite + UnoCSS + Pinia, dark tactical theme (amber/#0d1117)
- AppNav, ListingCard, SearchView with filters/sort, composables
  (useSnipeMode, useKonamiCode, useMotion), Pinia search store
- Steal shimmer, auction countdown, Snipe Mode easter egg all native in Vue
- docker/web/: nginx + multi-stage Dockerfile (node build → nginx serve)
- compose.yml: api (8510) + web (8509) services
- Dockerfile CMD updated to uvicorn for upcoming FastAPI layer
- Clean build: 0 TS errors, 380 modules
2026-03-25 15:11:35 -07:00

58 lines
2.7 KiB
JavaScript

'use strict';
var tape = require('tape');
var path = require('../');
tape('path.posix.dirname', function (t) {
t.strictEqual(path.posix.dirname('/a/b/'), '/a');
t.strictEqual(path.posix.dirname('/a/b'), '/a');
t.strictEqual(path.posix.dirname('/a'), '/');
t.strictEqual(path.posix.dirname(''), '.');
t.strictEqual(path.posix.dirname('/'), '/');
t.strictEqual(path.posix.dirname('////'), '/');
t.strictEqual(path.posix.dirname('//a'), '//');
t.strictEqual(path.posix.dirname('foo'), '.');
t.end();
});
tape('path.win32.dirname', { skip: true }, function (t) {
t.strictEqual(path.win32.dirname('c:\\'), 'c:\\');
t.strictEqual(path.win32.dirname('c:\\foo'), 'c:\\');
t.strictEqual(path.win32.dirname('c:\\foo\\'), 'c:\\');
t.strictEqual(path.win32.dirname('c:\\foo\\bar'), 'c:\\foo');
t.strictEqual(path.win32.dirname('c:\\foo\\bar\\'), 'c:\\foo');
t.strictEqual(path.win32.dirname('c:\\foo\\bar\\baz'), 'c:\\foo\\bar');
t.strictEqual(path.win32.dirname('\\'), '\\');
t.strictEqual(path.win32.dirname('\\foo'), '\\');
t.strictEqual(path.win32.dirname('\\foo\\'), '\\');
t.strictEqual(path.win32.dirname('\\foo\\bar'), '\\foo');
t.strictEqual(path.win32.dirname('\\foo\\bar\\'), '\\foo');
t.strictEqual(path.win32.dirname('\\foo\\bar\\baz'), '\\foo\\bar');
t.strictEqual(path.win32.dirname('c:'), 'c:');
t.strictEqual(path.win32.dirname('c:foo'), 'c:');
t.strictEqual(path.win32.dirname('c:foo\\'), 'c:');
t.strictEqual(path.win32.dirname('c:foo\\bar'), 'c:foo');
t.strictEqual(path.win32.dirname('c:foo\\bar\\'), 'c:foo');
t.strictEqual(path.win32.dirname('c:foo\\bar\\baz'), 'c:foo\\bar');
t.strictEqual(path.win32.dirname('file:stream'), '.');
t.strictEqual(path.win32.dirname('dir\\file:stream'), 'dir');
t.strictEqual(path.win32.dirname('\\\\unc\\share'),
'\\\\unc\\share');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo'),
'\\\\unc\\share\\');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\'),
'\\\\unc\\share\\');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\bar'),
'\\\\unc\\share\\foo');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\bar\\'),
'\\\\unc\\share\\foo');
t.strictEqual(path.win32.dirname('\\\\unc\\share\\foo\\bar\\baz'),
'\\\\unc\\share\\foo\\bar');
t.strictEqual(path.win32.dirname('/a/b/'), '/a');
t.strictEqual(path.win32.dirname('/a/b'), '/a');
t.strictEqual(path.win32.dirname('/a'), '/');
t.strictEqual(path.win32.dirname(''), '.');
t.strictEqual(path.win32.dirname('/'), '/');
t.strictEqual(path.win32.dirname('////'), '/');
t.strictEqual(path.win32.dirname('foo'), '.');
t.end();
});