1 | const path = require('path');
|
2 | const fs = require('fs');
|
3 |
|
4 | const expect = require('chai').expect;
|
5 |
|
6 | const v8flags = require('./');
|
7 |
|
8 | const tmpfile = path.resolve(process.versions.v8+'.flags.json');
|
9 |
|
10 | describe('v8flags', function () {
|
11 |
|
12 | it('should have created a temp file during installation', function() {
|
13 | expect(fs.existsSync(tmpfile)).to.be.true;
|
14 | });
|
15 |
|
16 | describe('::fetch', function () {
|
17 | it('should require v8 flags temp file', function () {
|
18 | expect(require(tmpfile)).to.deep.equal(v8flags.fetch());
|
19 | })
|
20 | });
|
21 |
|
22 | });
|