This repository has been archived on 2026-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
nyx/node_modules/path-browserify/test/test-path-isabsolute.js
Nico e2667f8e12 Initial nyx project — fork of hermes-frontend
Forked from hermes-frontend, stripped openclaw/bun specifics:
- Auth tokens: openclaw_session -> nyx_session
- Vite proxy: localhost:3003 -> localhost:8000 (assay)
- Prod WS: wss://assay.loop42.de/ws
- Workspace paths: removed openclaw-specific paths
- Added missing deps: @heroicons/vue, overlayscrollbars-vue
- Branding: title -> nyx

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 20:23:27 +02:00

34 lines
1.5 KiB
JavaScript

'use strict';
var tape = require('tape');
var path = require('../');
tape('path.win32.isAbsolute', { skip: true }, function (t) {
t.strictEqual(path.win32.isAbsolute('/'), true);
t.strictEqual(path.win32.isAbsolute('//'), true);
t.strictEqual(path.win32.isAbsolute('//server'), true);
t.strictEqual(path.win32.isAbsolute('//server/file'), true);
t.strictEqual(path.win32.isAbsolute('\\\\server\\file'), true);
t.strictEqual(path.win32.isAbsolute('\\\\server'), true);
t.strictEqual(path.win32.isAbsolute('\\\\'), true);
t.strictEqual(path.win32.isAbsolute('c'), false);
t.strictEqual(path.win32.isAbsolute('c:'), false);
t.strictEqual(path.win32.isAbsolute('c:\\'), true);
t.strictEqual(path.win32.isAbsolute('c:/'), true);
t.strictEqual(path.win32.isAbsolute('c://'), true);
t.strictEqual(path.win32.isAbsolute('C:/Users/'), true);
t.strictEqual(path.win32.isAbsolute('C:\\Users\\'), true);
t.strictEqual(path.win32.isAbsolute('C:cwd/another'), false);
t.strictEqual(path.win32.isAbsolute('C:cwd\\another'), false);
t.strictEqual(path.win32.isAbsolute('directory/directory'), false);
t.strictEqual(path.win32.isAbsolute('directory\\directory'), false);
t.end();
});
tape('path.posix.isAbsolute', function (t) {
t.strictEqual(path.posix.isAbsolute('/home/foo'), true);
t.strictEqual(path.posix.isAbsolute('/home/foo/..'), true);
t.strictEqual(path.posix.isAbsolute('bar/'), false);
t.strictEqual(path.posix.isAbsolute('./baz'), false);
t.end();
});