GOOD SHELL MAS BOY
Server: Apache/2.4.52 (Ubuntu)
System: Linux vmi1836763.contaboserver.net 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User: www-data (33)
PHP: 8.4.10
Disabled: NONE
Upload Files
File: //usr/local/lib/node_modules/firebase-tools/node_modules/glob-slash/test.js
var globSlash = require('./index');
var test = require('tape');

test('adds slash to beginning', function (t) {
  
  t.equal(globSlash('someGlob/**'), '/someGlob/**', 'added slash');
  t.equal(globSlash('/someGlob/**'), '/someGlob/**', 'already had a slash');
  t.end();
});

test('normalizes', function (t) {
  
  t.equal(globSlash('//**'), '/**', 'removed slash at beginning');
  t.equal(globSlash('**//**'), '/**/**', 'removed slash in middle');
  t.equal(globSlash.normalize('**//**'), '/**/**', 'removed slash in middle with normalize method');
  t.end();
});

test('adds slash with negation', function (t) {
  
  t.equal(globSlash('!something/**'), '!/something/**', 'added slash to beginning with no slash yet');
  t.equal(globSlash('!/something/**'), '!/something/**', 'added slash to beginning with a slash already there');
  t.end();
});