File: test.js

package info (click to toggle)
node-is-path-inside 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 104 kB
  • sloc: makefile: 4; sh: 2
file content (10 lines) | stat: -rw-r--r-- 309 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
'use strict';
var assert = require('assert');
var isPathInside = require('./');

it('should check if a path is inside another path', function () {
	assert(isPathInside('a/b/c', 'a/b'));
	assert(isPathInside('/a/b/c', '/a/b'));
	assert(!isPathInside('a/b', 'a/b'));
	assert(!isPathInside('/a/b', '/a/b'));
});