Skip to content

Commit

Permalink
fix(test) - require index.js for best test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Edouard committed Nov 12, 2015
1 parent 26dd547 commit 0987184
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ module.exports = {
types: require('./lib/types'),
windef: require('./lib/windef'),
Key: require('./lib/key'),
fileAssociation: require('./lib/file_association'),
uac: require('./lib/uac')
utils: require('./lib/utils')
};
2 changes: 1 addition & 1 deletion test/file_association.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if (process.env.TEST_MOCKS_ON) {
require('./test_helper');
}

var utils = require('../lib/utils'),
var utils = require('../index').utils,
assert = require('assert');

describe('File Association Test', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/key.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
'use strict';
require('./test_helper');
var assert = require('assert'),
windef = require('../lib/windef'),
Key = require('../lib/key');
windef = require('../index').windef,
Key = require('../index').Key;

describe('Key Open Tests', () => {
it('Should create a key given a subkey', () => {
Expand Down
11 changes: 3 additions & 8 deletions test/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
'use strict';
require('./test_helper');

var assert = require('assert');
var assert = require('assert'),
registry = require('../index').registry,
windef = require('../index').windef;

describe('Registry API open tests', () => {
var registry = require('../lib/registry'),
windef = require('../lib/windef');

it('Should open a subkey provided a predefined key', () => {
var key = registry.openKeyFromPredefined(windef.HKEY.HKEY_CLASSES_ROOT, '.txt', windef.KEY_ACCESS.KEY_ALL_ACCESS);
console.log(key.handle);
Expand All @@ -23,8 +22,6 @@ describe('Registry API open tests', () => {
});

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

Expand Down Expand Up @@ -52,8 +49,6 @@ describe('Create Key Tests', function () {
});

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

Expand Down

0 comments on commit 0987184

Please sign in to comment.