Skip to content

Commit 9302802

Browse files
sttkphated
andauthoredSep 11, 2022
chore!: Normalize repository, dropping node <10.13 support (#151)
chore!: Remove `inspect` method & rely on `util.inspect.custom` symbol Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
1 parent 50a775b commit 9302802

15 files changed

+187
-273
lines changed
 

‎.ci/.azure-pipelines-steps.yml

-38
This file was deleted.

‎.ci/.azure-pipelines.yml

-90
This file was deleted.

‎.github/support.yml

-2
This file was deleted.

‎.github/workflows/dev.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: dev
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
env:
9+
CI: true
10+
11+
jobs:
12+
prettier:
13+
name: Format code
14+
runs-on: ubuntu-latest
15+
if: ${{ github.event_name == 'push' }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Prettier
22+
uses: gulpjs/prettier_action@v3.0
23+
with:
24+
commit_message: 'chore: Run prettier'
25+
prettier_options: '--write .'
26+
27+
test:
28+
name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }}
29+
runs-on: ${{ matrix.os }}
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
node: [10, 12, 14, 16]
35+
os: [ubuntu-latest, windows-latest, macos-latest]
36+
37+
steps:
38+
- name: Clone repository
39+
uses: actions/checkout@v2
40+
41+
- name: Set Node.js version
42+
uses: actions/setup-node@v2
43+
with:
44+
node-version: ${{ matrix.node }}
45+
46+
- run: node --version
47+
- run: npm --version
48+
49+
- name: Install npm dependencies
50+
run: npm install
51+
52+
- name: Run lint
53+
run: npm run lint
54+
55+
- name: Run tests
56+
run: npm test
57+
58+
- name: Coveralls
59+
uses: coverallsapp/github-action@v1.1.2
60+
with:
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
flag-name: ${{matrix.os}}-node-${{ matrix.node }}
63+
parallel: true
64+
65+
coveralls:
66+
needs: test
67+
name: Finish up
68+
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Coveralls Finished
72+
uses: coverallsapp/github-action@v1.1.2
73+
with:
74+
github-token: ${{ secrets.GITHUB_TOKEN }}
75+
parallel-finished: true

‎.github/workflows/release.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: GoogleCloudPlatform/release-please-action@v2
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
release-type: node
16+
package-name: release-please-action
17+
bump-minor-pre-major: true

‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ coverage
2020
# nyc test coverage
2121
.nyc_output
2222

23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
23+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
2424
.grunt
2525

2626
# Bower dependency directory (https://bower.io/)

‎.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage/
2+
.nyc_output/
3+
CHANGELOG.md

‎.travis.yml

-12
This file was deleted.

‎LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
3+
Copyright (c) 2013, 2016-2022 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎README.md

+18-21
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<p align="center">
2-
<a href="http://gulpjs.com">
2+
<a href="https://gulpjs.com">
33
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
44
</a>
55
</p>
66

77
# vinyl
88

9-
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
9+
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]
1010

1111
Virtual file format.
1212

@@ -421,32 +421,29 @@ Same goes for `clone()`. If you have your own internal stuff that needs special
421421

422422
MIT
423423

424+
425+
<!-- prettier-ignore-start -->
426+
[downloads-image]: https://img.shields.io/npm/dm/vinyl.svg?style=flat-square
427+
[npm-url]: https://www.npmjs.com/package/vinyl
428+
[npm-image]: https://img.shields.io/npm/v/vinyl.svg?style=flat-square
429+
430+
[ci-url]: https://github.com/gulpjs/vinyl/actions?query=workflow:dev
431+
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/vinyl/dev?style=flat-square
432+
433+
[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl
434+
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/vinyl/master.svg?style=flat-square
435+
<!-- prettier-ignore-end -->
436+
437+
<!-- prettier-ignore-start -->
424438
[is-symbolic]: #issymbolic
425439
[is-directory]: #isdirectory
426440
[normalization]: #normalization-and-concatenation
427441
[extending-vinyl]: #extending-vinyl
428442
[stream]: https://nodejs.org/api/stream.html#stream_stream
429443
[readable-stream]: https://nodejs.org/api/stream.html#stream_readable_streams
430444
[buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer
431-
[fs-stats]: http://nodejs.org/api/fs.html#fs_class_fs_stats
445+
[fs-stats]: https://nodejs.org/api/fs.html#fs_class_fs_stats
432446
[vinyl-fs]: https://github.com/gulpjs/vinyl-fs
433447
[cloneable-readable]: https://github.com/mcollina/cloneable-readable
448+
<!-- prettier-ignore-end -->
434449

435-
[downloads-image]: https://img.shields.io/npm/dm/vinyl.svg
436-
[npm-url]: https://www.npmjs.com/package/vinyl
437-
[npm-image]: https://img.shields.io/npm/v/vinyl.svg
438-
439-
[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=$PROJECT_ID&branchName=master
440-
[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/vinyl?branchName=master
441-
442-
[travis-url]: https://travis-ci.org/gulpjs/vinyl
443-
[travis-image]: https://img.shields.io/travis/gulpjs/vinyl.svg?label=travis-ci
444-
445-
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/vinyl
446-
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/vinyl.svg?label=appveyor
447-
448-
[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl
449-
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/vinyl/master.svg
450-
451-
[gitter-url]: https://gitter.im/gulpjs/gulp
452-
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg

‎appveyor.yml

-32
This file was deleted.

‎index.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22

33
var path = require('path');
44
var util = require('util');
5-
var isBuffer = require('buffer').Buffer.isBuffer;
5+
var Buffer = require('buffer').Buffer;
66

77
var clone = require('clone');
88
var cloneable = require('cloneable-readable');
99
var replaceExt = require('replace-ext');
1010
var cloneStats = require('clone-stats');
11-
var cloneBuffer = require('clone-buffer');
1211
var removeTrailingSep = require('remove-trailing-separator');
1312

1413
var isStream = require('./lib/is-stream');
@@ -59,7 +58,7 @@ function File(file) {
5958
}
6059

6160
File.prototype.isBuffer = function() {
62-
return isBuffer(this.contents);
61+
return Buffer.isBuffer(this.contents);
6362
};
6463

6564
File.prototype.isStream = function() {
@@ -117,7 +116,7 @@ File.prototype.clone = function(opt) {
117116
if (this.isStream()) {
118117
contents = this.contents.clone();
119118
} else if (this.isBuffer()) {
120-
contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
119+
contents = opt.contents ? Buffer.from(this.contents) : this.contents;
121120
}
122121

123122
var file = new this.constructor({
@@ -141,7 +140,8 @@ File.prototype.clone = function(opt) {
141140
return file;
142141
};
143142

144-
File.prototype.inspect = function() {
143+
// Node.js v6.6.0+ use this symbol for custom inspection.
144+
File.prototype[util.inspect.custom] = function() {
145145
var inspect = [];
146146

147147
// Use relative path if possible
@@ -162,11 +162,6 @@ File.prototype.inspect = function() {
162162
return '<File ' + inspect.join(' ') + '>';
163163
};
164164

165-
// Newer Node.js versions use this symbol for custom inspection.
166-
if (util.inspect.custom) {
167-
File.prototype[util.inspect.custom] = File.prototype.inspect;
168-
}
169-
170165
File.isCustomProp = function(key) {
171166
return builtInFields.indexOf(key) === -1;
172167
};
@@ -182,7 +177,7 @@ Object.defineProperty(File.prototype, 'contents', {
182177
return this._contents;
183178
},
184179
set: function(val) {
185-
if (!isBuffer(val) && !isStream(val) && (val !== null)) {
180+
if (!Buffer.isBuffer(val) && !isStream(val) && (val !== null)) {
186181
throw new Error('File.contents can only be a Buffer, a Stream, or null.');
187182
}
188183

@@ -306,7 +301,12 @@ Object.defineProperty(File.prototype, 'extname', {
306301

307302
Object.defineProperty(File.prototype, 'path', {
308303
get: function() {
309-
return this.history[this.history.length - 1];
304+
var path = this.history[this.history.length - 1];
305+
if (path) {
306+
return path;
307+
} else {
308+
return null;
309+
}
310310
},
311311
set: function(path) {
312312
if (typeof path !== 'string') {

‎package.json

+20-15
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"repository": "gulpjs/vinyl",
1111
"license": "MIT",
1212
"engines": {
13-
"node": ">= 0.10"
13+
"node": ">=10.13.0"
1414
},
1515
"main": "index.js",
1616
"files": [
@@ -21,27 +21,32 @@
2121
"scripts": {
2222
"lint": "eslint .",
2323
"pretest": "npm run lint",
24-
"test": "nyc mocha --async-only",
25-
"azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit",
26-
"coveralls": "nyc report --reporter=text-lcov | coveralls"
24+
"test": "nyc mocha --async-only"
2725
},
2826
"dependencies": {
2927
"clone": "^2.1.1",
30-
"clone-buffer": "^1.0.0",
3128
"clone-stats": "^1.0.0",
32-
"cloneable-readable": "^1.0.0",
29+
"cloneable-readable": "^2.1.0",
3330
"remove-trailing-separator": "^1.0.1",
34-
"replace-ext": "^1.0.0"
31+
"replace-ext": "^2.0.0"
3532
},
3633
"devDependencies": {
37-
"coveralls": "github:phated/node-coveralls#2.x",
38-
"eslint": "^2.13.1",
39-
"eslint-config-gulp": "^3.0.1",
40-
"expect": "^1.20.2",
41-
"mississippi": "^1.2.0",
42-
"mocha": "^3.0.0",
43-
"nyc": "^10.3.2",
44-
"safer-buffer": "^2.1.2"
34+
"eslint": "^7.32.0",
35+
"eslint-config-gulp": "^5.0.1",
36+
"eslint-plugin-node": "^11.1.0",
37+
"expect": "^27.4.6",
38+
"mississippi": "^4.0.0",
39+
"mocha": "^8.4.0",
40+
"nyc": "^15.1.0"
41+
},
42+
"nyc": {
43+
"reporter": [
44+
"lcov",
45+
"text-summary"
46+
]
47+
},
48+
"prettier": {
49+
"singleQuote": true
4550
},
4651
"keywords": [
4752
"virtual",

‎test/.eslintrc

-3
This file was deleted.

‎test/file.js

+40-46
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ var util = require('util');
66
var expect = require('expect');
77
var miss = require('mississippi');
88
var cloneable = require('cloneable-readable');
9-
var saferBuffer = require('safer-buffer');
109

1110
var File = require('../');
1211

1312
var pipe = miss.pipe;
1413
var from = miss.from;
1514
var concat = miss.concat;
1615
var isCloneable = cloneable.isCloneable;
17-
var Buffer = saferBuffer.Buffer;
1816

1917
var isWin = (process.platform === 'win32');
2018

@@ -98,7 +96,7 @@ describe('File', function() {
9896

9997
it('defaults path to null', function(done) {
10098
var file = new File();
101-
expect(file.path).toNotExist();
99+
expect(file.path).toBeFalsy();
102100
expect(file.path).toEqual(null);
103101
done();
104102
});
@@ -111,14 +109,14 @@ describe('File', function() {
111109

112110
it('defaults stat to null', function(done) {
113111
var file = new File();
114-
expect(file.stat).toNotExist();
112+
expect(file.stat).toBeFalsy();
115113
expect(file.stat).toEqual(null);
116114
done();
117115
});
118116

119117
it('defaults contents to null', function(done) {
120118
var file = new File();
121-
expect(file.contents).toNotExist();
119+
expect(file.contents).toBeFalsy();
122120
expect(file.contents).toEqual(null);
123121
done();
124122
});
@@ -435,11 +433,11 @@ describe('File', function() {
435433
var file = new File(options);
436434
var file2 = file.clone();
437435

438-
expect(file2).toNotBe(file);
436+
expect(file2).not.toBe(file);
439437
expect(file2.cwd).toEqual(file.cwd);
440438
expect(file2.base).toEqual(file.base);
441439
expect(file2.path).toEqual(file.path);
442-
expect(file2.contents).toNotBe(file.contents);
440+
expect(file2.contents).not.toBe(file.contents);
443441
expect(file2.contents.toString('utf8')).toEqual(file.contents.toString('utf8'));
444442
done();
445443
});
@@ -457,10 +455,10 @@ describe('File', function() {
457455
expect(copy1.contents).toBe(file.contents);
458456

459457
var copy2 = file.clone();
460-
expect(copy2.contents).toNotBe(file.contents);
458+
expect(copy2.contents).not.toBe(file.contents);
461459

462460
var copy3 = file.clone({ contents: 'invalid' });
463-
expect(copy3.contents).toNotBe(file.contents);
461+
expect(copy3.contents).not.toBe(file.contents);
464462
done();
465463
});
466464

@@ -474,11 +472,11 @@ describe('File', function() {
474472
var file = new File(options);
475473
var file2 = file.clone();
476474

477-
expect(file2).toNotBe(file);
475+
expect(file2).not.toBe(file);
478476
expect(file2.cwd).toEqual(file.cwd);
479477
expect(file2.base).toEqual(file.base);
480478
expect(file2.path).toEqual(file.path);
481-
expect(file2.contents).toNotBe(file.contents);
479+
expect(file2.contents).not.toBe(file.contents);
482480

483481
var ends = 2;
484482
var data = null;
@@ -491,7 +489,7 @@ describe('File', function() {
491489
}
492490

493491
if (--ends === 0) {
494-
expect(data).toNotBe(data2);
492+
expect(data).not.toBe(data2);
495493
expect(data.toString('utf8')).toEqual(data2.toString('utf8'));
496494
done();
497495
}
@@ -596,7 +594,7 @@ describe('File', function() {
596594
var file = new File(options);
597595
var file2 = file.clone();
598596

599-
expect(file2).toNotBe(file);
597+
expect(file2).not.toBe(file);
600598
expect(file2.symlink).toEqual(file.symlink);
601599
done();
602600
});
@@ -611,11 +609,11 @@ describe('File', function() {
611609
var file = new File(options);
612610
var file2 = file.clone();
613611

614-
expect(file2).toNotBe(file);
612+
expect(file2).not.toBe(file);
615613
expect(file2.cwd).toEqual(file.cwd);
616614
expect(file2.base).toEqual(file.base);
617615
expect(file2.path).toEqual(file.path);
618-
expect(file2.contents).toNotExist();
616+
expect(file2.contents).toBeFalsy();
619617
done();
620618
});
621619

@@ -633,8 +631,8 @@ describe('File', function() {
633631

634632
expect(copy.stat.isFile()).toEqual(true);
635633
expect(copy.stat.isDirectory()).toEqual(false);
636-
expect(file.stat).toBeAn(fs.Stats);
637-
expect(copy.stat).toBeAn(fs.Stats);
634+
expect(file.stat).toBeInstanceOf(fs.Stats);
635+
expect(copy.stat).toBeInstanceOf(fs.Stats);
638636
done();
639637
});
640638

@@ -651,7 +649,7 @@ describe('File', function() {
651649

652650
expect(copy.history[0]).toEqual(options.path);
653651
copy.path = 'lol';
654-
expect(file.path).toNotEqual(copy.path);
652+
expect(file.path).not.toEqual(copy.path);
655653
done();
656654
});
657655

@@ -667,12 +665,12 @@ describe('File', function() {
667665
var file = new File(options);
668666
var file2 = file.clone();
669667

670-
expect(file2).toNotBe(file);
668+
expect(file2).not.toBe(file);
671669
expect(file2.cwd).toEqual(file.cwd);
672670
expect(file2.base).toEqual(file.base);
673671
expect(file2.path).toEqual(file.path);
674-
expect(file2.custom).toNotBe(file.custom);
675-
expect(file2.custom.meta).toNotBe(file.custom.meta);
672+
expect(file2.custom).not.toBe(file.custom);
673+
expect(file2.custom.meta).not.toBe(file.custom.meta);
676674
expect(file2.custom).toEqual(file.custom);
677675
done();
678676
});
@@ -696,7 +694,7 @@ describe('File', function() {
696694
var file2 = file.clone();
697695

698696
expect(file2.history).toEqual(history);
699-
expect(file2.history).toNotBe(file.history);
697+
expect(file2.history).not.toBe(file.history);
700698
expect(file2.path).toEqual(history[2]);
701699
done();
702700
});
@@ -714,21 +712,21 @@ describe('File', function() {
714712

715713
var file2 = file.clone();
716714
expect(file2.custom).toEqual(file.custom);
717-
expect(file2.custom).toNotBe(file.custom);
715+
expect(file2.custom).not.toBe(file.custom);
718716
expect(file2.custom.meta).toEqual(file.custom.meta);
719-
expect(file2.custom.meta).toNotBe(file.custom.meta);
717+
expect(file2.custom.meta).not.toBe(file.custom.meta);
720718

721719
var file3 = file.clone(true);
722720
expect(file3.custom).toEqual(file.custom);
723-
expect(file3.custom).toNotBe(file.custom);
721+
expect(file3.custom).not.toBe(file.custom);
724722
expect(file3.custom.meta).toEqual(file.custom.meta);
725-
expect(file3.custom.meta).toNotBe(file.custom.meta);
723+
expect(file3.custom.meta).not.toBe(file.custom.meta);
726724

727725
var file4 = file.clone({ deep: true });
728726
expect(file4.custom).toEqual(file.custom);
729-
expect(file4.custom).toNotBe(file.custom);
727+
expect(file4.custom).not.toBe(file.custom);
730728
expect(file4.custom.meta).toEqual(file.custom.meta);
731-
expect(file4.custom.meta).toNotBe(file.custom.meta);
729+
expect(file4.custom.meta).not.toBe(file.custom.meta);
732730

733731
var file5 = file.clone(false);
734732
expect(file5.custom).toEqual(file.custom);
@@ -759,12 +757,12 @@ describe('File', function() {
759757
var file = new ExtendedFile();
760758
var file2 = file.clone();
761759

762-
expect(file2).toNotBe(file);
760+
expect(file2).not.toBe(file);
763761
expect(file2.constructor).toBe(ExtendedFile);
764-
expect(file2).toBeAn(ExtendedFile);
765-
expect(file2).toBeA(File);
766-
expect(ExtendedFile.prototype.isPrototypeOf(file2)).toEqual(true);
767-
expect(File.prototype.isPrototypeOf(file2)).toEqual(true);
762+
expect(file2).toBeInstanceOf(ExtendedFile);
763+
expect(file2).toBeInstanceOf(File);
764+
expect(Object.prototype.isPrototypeOf.call(ExtendedFile.prototype, file2)).toEqual(true);
765+
expect(Object.prototype.isPrototypeOf.call(File.prototype, file2)).toEqual(true);
768766
done();
769767
});
770768
});
@@ -774,18 +772,14 @@ describe('File', function() {
774772
it('returns correct format when no contents and no path', function(done) {
775773
var file = new File();
776774
var expectation = '<File >';
777-
expect(file.inspect()).toEqual(expectation);
778775
expect(util.inspect(file)).toEqual(expectation);
779-
if (util.inspect.custom) {
780-
expect(file[util.inspect.custom]()).toEqual(expectation);
781-
}
782776
done();
783777
});
784778

785779
it('returns correct format when Buffer contents and no path', function(done) {
786780
var val = Buffer.from('test');
787781
var file = new File({ contents: val });
788-
expect(file.inspect()).toEqual('<File <Buffer 74 65 73 74>>');
782+
expect(util.inspect(file)).toEqual('<File <Buffer 74 65 73 74>>');
789783
done();
790784
});
791785

@@ -797,7 +791,7 @@ describe('File', function() {
797791
path: '/test/test.coffee',
798792
contents: val,
799793
});
800-
expect(file.inspect()).toEqual('<File "test.coffee" <Buffer 74 65 73 74>>');
794+
expect(util.inspect(file)).toEqual('<File "test.coffee" <Buffer 74 65 73 74>>');
801795
done();
802796
});
803797

@@ -808,7 +802,7 @@ describe('File', function() {
808802
path: '/test/test.coffee',
809803
contents: from([]),
810804
});
811-
expect(file.inspect()).toEqual('<File "test.coffee" <CloneableStream>>');
805+
expect(util.inspect(file)).toEqual('<File "test.coffee" <CloneableStream>>');
812806
done();
813807
});
814808

@@ -819,7 +813,7 @@ describe('File', function() {
819813
path: '/test/test.coffee',
820814
contents: null,
821815
});
822-
expect(file.inspect()).toEqual('<File "test.coffee">');
816+
expect(util.inspect(file)).toEqual('<File "test.coffee">');
823817
done();
824818
});
825819
});
@@ -978,7 +972,7 @@ describe('File', function() {
978972
cwd: '/foo',
979973
base: '/bar',
980974
});
981-
expect(file.base).toNotEqual(file.cwd);
975+
expect(file.base).not.toEqual(file.cwd);
982976
file.base = file.cwd;
983977
expect(file.base).toEqual(file.cwd);
984978
done();
@@ -989,11 +983,11 @@ describe('File', function() {
989983
cwd: '/foo',
990984
base: '/bar',
991985
});
992-
expect(file.base).toNotEqual(file.cwd);
986+
expect(file.base).not.toEqual(file.cwd);
993987
file.base = null;
994988
expect(file.base).toEqual(file.cwd);
995989
file.base = '/bar/';
996-
expect(file.base).toNotEqual(file.cwd);
990+
expect(file.base).not.toEqual(file.cwd);
997991
file.base = undefined;
998992
expect(file.base).toEqual(file.cwd);
999993
done();
@@ -1205,7 +1199,7 @@ describe('File', function() {
12051199
var file = new File();
12061200

12071201
function invalid() {
1208-
var a = file.basename;
1202+
file.basename;
12091203
}
12101204

12111205
expect(invalid).toThrow('No path specified! Can not get basename.');
@@ -1518,7 +1512,7 @@ describe('File', function() {
15181512
it('throws on set with null path', function(done) {
15191513
var file = new File();
15201514

1521-
expect(file.path).toNotExist();
1515+
expect(file.path).toBeFalsy();
15221516
expect(file.history).toEqual([]);
15231517

15241518
function invalid() {

0 commit comments

Comments
 (0)
Please sign in to comment.