Skip to content

Commit 0987184

Browse files
author
Steven Edouard
committedNov 12, 2015
fix(test) - require index.js for best test coverage
1 parent 26dd547 commit 0987184

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed
 

‎index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ module.exports = {
44
types: require('./lib/types'),
55
windef: require('./lib/windef'),
66
Key: require('./lib/key'),
7-
fileAssociation: require('./lib/file_association'),
8-
uac: require('./lib/uac')
7+
utils: require('./lib/utils')
98
};

‎test/file_association.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if (process.env.TEST_MOCKS_ON) {
44
require('./test_helper');
55
}
66

7-
var utils = require('../lib/utils'),
7+
var utils = require('../index').utils,
88
assert = require('assert');
99

1010
describe('File Association Test', () => {

‎test/key.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
'use strict';
33
require('./test_helper');
44
var assert = require('assert'),
5-
windef = require('../lib/windef'),
6-
Key = require('../lib/key');
5+
windef = require('../index').windef,
6+
Key = require('../index').Key;
77

88
describe('Key Open Tests', () => {
99
it('Should create a key given a subkey', () => {

‎test/registry.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
'use strict';
33
require('./test_helper');
44

5-
var assert = require('assert');
5+
var assert = require('assert'),
6+
registry = require('../index').registry,
7+
windef = require('../index').windef;
68

79
describe('Registry API open tests', () => {
8-
var registry = require('../lib/registry'),
9-
windef = require('../lib/windef');
10-
1110
it('Should open a subkey provided a predefined key', () => {
1211
var key = registry.openKeyFromPredefined(windef.HKEY.HKEY_CLASSES_ROOT, '.txt', windef.KEY_ACCESS.KEY_ALL_ACCESS);
1312
console.log(key.handle);
@@ -23,8 +22,6 @@ describe('Registry API open tests', () => {
2322
});
2423

2524
describe('Create Key Tests', function () {
26-
var registry = require('../lib/registry'),
27-
windef = require('../lib/windef');
2825
it('Should create a new key and delete it', () => {
2926
var key = registry.openKeyFromPredefined(windef.HKEY.HKEY_CLASSES_ROOT, '.txt', windef.KEY_ACCESS.KEY_ALL_ACCESS);
3027

@@ -52,8 +49,6 @@ describe('Create Key Tests', function () {
5249
});
5350

5451
describe('Set / Query Value Tests', function () {
55-
var registry = require('../lib/registry'),
56-
windef = require('../lib/windef');
5752
it('Should set and read REG_SZ Value', () => {
5853
var key = registry.openKeyFromPredefined(windef.HKEY.HKEY_CLASSES_ROOT, '.txt', windef.KEY_ACCESS.KEY_ALL_ACCESS);
5954

0 commit comments

Comments
 (0)
Please sign in to comment.