Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.140.201.179
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp_probe /
node_modules /
node-sass /
test /
Delete
Unzip
Name
Size
Permission
Date
Action
fixtures
[ DIR ]
drwxr-xr-x
2021-02-04 21:24
scripts
[ DIR ]
drwxr-xr-x
2021-02-04 21:24
.eslintrc
37
B
-rw-r--r--
2016-09-13 10:22
api.js
62.92
KB
-rw-r--r--
2018-08-09 12:53
binding.js
3.33
KB
-rw-r--r--
2018-08-09 12:53
cli.js
24.96
KB
-rw-r--r--
2018-08-09 12:53
downloadoptions.js
1.67
KB
-rw-r--r--
2018-07-08 11:24
errors.js
1.51
KB
-rw-r--r--
2016-09-13 10:22
lowlevel.js
6.18
KB
-rw-r--r--
2018-08-09 12:53
runtime.js
5.89
KB
-rw-r--r--
2018-08-09 12:53
spec.js
6.44
KB
-rw-r--r--
2018-08-09 12:53
types.js
18.88
KB
-rw-r--r--
2018-03-13 10:53
useragent.js
449
B
-rw-r--r--
2016-11-17 10:39
watcher.js
17.04
KB
-rw-r--r--
2018-08-09 12:53
Save
Rename
var assert = require('assert'), fs = require('fs-extra'), path = require('path'), temp = require('unique-temp-dir'), watcher = require('../lib/watcher'); describe('watcher', function() { var main, sibling; var origin = path.join(__dirname, 'fixtures', 'watcher'); beforeEach(function() { var fixture = temp(); fs.ensureDirSync(fixture); fs.copySync(origin, fixture); main = fs.realpathSync(path.join(fixture, 'main')); sibling = fs.realpathSync(path.join(fixture, 'sibling')); }); describe('with directory', function() { beforeEach(function() { watcher.reset({ directory: main, includePath: [main] }); }); describe('when a file is changed', function() { describe('and it is in the graph', function() { describe('if it is a partial', function() { it('should record its ancestors as changed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); assert.deepEqual(files.changed, [ path.join(main, 'one.scss'), ]); }); it('should record its decendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); assert.deepEqual(files.added, [ path.join(main, 'partials', '_three.scss'), ]); }); it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); assert.deepEqual(files.removed, []); }); }); describe('if it is not a partial', function() { it('should record itself as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); assert.deepEqual(files.changed, [ file, ]); }); it('should record its decendants as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); assert.deepEqual(files.added, [ path.join(main, 'partials', '_one.scss'), path.join(main, 'partials', '_three.scss'), ]); }); it('should record nothing as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); assert.deepEqual(files.removed, []); }); }); }); describe('and is not in the graph', function() { describe('if it is a partial', function() { it('should not record anything', function() { var file = path.join(sibling, 'partials', '_three.scss'); var files = watcher.changed(file); assert.deepEqual(files, { added: [], changed: [], removed: [], }); }); }); describe('if it is not a partial', function() { it('should record itself as changed', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.changed(file); assert.deepEqual(files, { added: [], changed: [file], removed: [], }); }); }); }); }); describe('when a file is added', function() { describe('and it is in the graph', function() { describe('if it is a partial', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.added, []); }); it('should record its decendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.added(file); assert.deepEqual(files.added, [ path.join(main, 'partials', '_three.scss') ]); }); it('should record nothing as changed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.removed, []); }); }); describe('if it is not a partial', function() { it('should record nothing as added', function() { var file = path.join(main, 'three.scss'); var files = watcher.added(file); assert.deepEqual(files.added, []); }); it('should record its decendants as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); assert.deepEqual(files.added, [ path.join(main, 'partials', '_one.scss'), path.join(main, 'partials', '_three.scss'), ]); }); it('should record nothing as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); assert.deepEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); assert.deepEqual(files.removed, []); }); }); }); }); describe('when a file is removed', function() { describe('and it is in the graph', function() { describe('if it is a partial', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); assert.deepEqual(files.added, []); }); it('should record its ancestors as changed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); assert.deepEqual(files.changed, [ path.join(main, 'one.scss'), ]); }); it('should record itself as removed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); assert.deepEqual(files.removed, [file]); }); }); describe('if it is not a partial', function() { it('should record nothing as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); assert.deepEqual(files.added, []); }); it('should record nothing as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); assert.deepEqual(files.changed, []); }); it('should record itself as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); assert.deepEqual(files.removed, [file]); }); }); }); describe('and is not in the graph', function() { describe('if it is a partial', function() { it('should record nothing', function() { var file = path.join(sibling, 'partials', '_three.scss'); var files = watcher.removed(file); assert.deepEqual(files, { added: [], changed: [], removed: [], }); }); }); describe('if it is not a partial', function() { it('should record nothing', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.removed(file); assert.deepEqual(files, { added: [], changed: [], removed: [], }); }); }); }); }); }); describe('with file', function() { beforeEach(function() { watcher.reset({ src: path.join(main, 'one.scss'), includePath: [main] }); }); describe('when a file is changed', function() { describe('and it is in the graph', function() { describe('if it is a partial', function() { it('should record its decendents as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); assert.deepEqual(files.added, [ path.join(main, 'partials', '_three.scss'), ]); }); it('should record its ancenstors as changed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); assert.deepEqual(files.changed, [ path.join(main, 'one.scss'), ]); }); it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.changed(file); assert.deepEqual(files.removed, []); }); }); describe('if it is not a partial', function() { it('should record its decendents as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); assert.deepEqual(files.added, [ path.join(main, 'partials', '_one.scss'), path.join(main, 'partials', '_three.scss'), ]); }); it('should record itself as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); assert.deepEqual(files.changed, [file]); }); it('should record nothing as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.changed(file); assert.deepEqual(files.removed, []); }); }); }); describe('and it is not in the graph', function() { describe('if it is a partial', function() { it('should record nothing', function() { var file = path.join(sibling, 'partials', '_three.scss'); var files = watcher.changed(file); assert.deepEqual(files, { added: [], changed: [], removed: [], }); }); }); describe('if it is not a partial', function() { it('should record nothing as added', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.changed(file); assert.deepEqual(files.added, []); }); it('should record itself as changed', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.changed(file); assert.deepEqual(files.changed, [file]); }); it('should record nothing as removed', function() { var file = path.join(sibling, 'three.scss'); var files = watcher.changed(file); assert.deepEqual(files.removed, []); }); }); }); }); describe('when a file is added', function() { describe('and it is in the graph', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.added, []); }); it('should record its decendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.added(file); assert.deepEqual(files.added, [ path.join(main, 'partials', '_three.scss'), ]); }); it('should record nothing as changed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.removed, []); }); }); describe('and it is not in the graph', function() { beforeEach(function() { watcher.reset({ src: path.join(main, 'two.scss'), includePath: [main] }); }); describe('if it is a partial', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.added, [ file, ]); }); it('should not record its decendants as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.added(file); assert.deepEqual(files.added, [ file, ]); }); it('should record nothing as changed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'partials', '_three.scss'); var files = watcher.added(file); assert.deepEqual(files.removed, []); }); }); describe('if it is not a partial', function() { it('should record itself as added', function() { var file = path.join(main, 'three.scss'); var files = watcher.added(file); assert.deepEqual(files.added, [ file, ]); }); it('should record nothing as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); assert.deepEqual(files.changed, []); }); it('should record nothing as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.added(file); assert.deepEqual(files.removed, []); }); }); }); }); describe('when a file is removed', function() { describe('and it is in the graph', function() { describe('if it is a partial', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); assert.deepEqual(files.added, []); }); it('should record its ancestors as changed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); assert.deepEqual(files.changed, [ path.join(main, 'one.scss'), ]); }); it('should record itself as removed', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); assert.deepEqual(files.removed, [file]); }); }); describe('if it is not a partial', function() { it('should record nothing as added', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); assert.deepEqual(files.added, []); }); it('should record nothing as changed', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); assert.deepEqual(files.changed, []); }); it('should record itself as removed', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); assert.deepEqual(files.removed, [file]); }); }); }); describe('and is not in the graph', function() { beforeEach(function() { watcher.reset({ src: path.join(main, 'two.scss'), includePath: [main] }); }); describe('if it is a partial', function() { it('should record nothing as added', function() { var file = path.join(main, 'partials', '_one.scss'); var files = watcher.removed(file); assert.deepEqual(files, { added: [], changed: [], removed: [], }); }); }); describe('if it is not a partial', function() { it('should record nothing', function() { var file = path.join(main, 'one.scss'); var files = watcher.removed(file); assert.deepEqual(files, { added: [], changed: [], removed: [], }); }); }); }); }); }); });