2
2
'use strict' ;
3
3
require ( './test_helper' ) ;
4
4
5
- var assert = require ( 'assert' ) ;
5
+ var assert = require ( 'assert' ) ,
6
+ registry = require ( '../index' ) . registry ,
7
+ windef = require ( '../index' ) . windef ;
6
8
7
9
describe ( 'Registry API open tests' , ( ) => {
8
- var registry = require ( '../lib/registry' ) ,
9
- windef = require ( '../lib/windef' ) ;
10
-
11
10
it ( 'Should open a subkey provided a predefined key' , ( ) => {
12
11
var key = registry . openKeyFromPredefined ( windef . HKEY . HKEY_CLASSES_ROOT , '.txt' , windef . KEY_ACCESS . KEY_ALL_ACCESS ) ;
13
12
console . log ( key . handle ) ;
@@ -23,8 +22,6 @@ describe('Registry API open tests', () => {
23
22
} ) ;
24
23
25
24
describe ( 'Create Key Tests' , function ( ) {
26
- var registry = require ( '../lib/registry' ) ,
27
- windef = require ( '../lib/windef' ) ;
28
25
it ( 'Should create a new key and delete it' , ( ) => {
29
26
var key = registry . openKeyFromPredefined ( windef . HKEY . HKEY_CLASSES_ROOT , '.txt' , windef . KEY_ACCESS . KEY_ALL_ACCESS ) ;
30
27
@@ -52,8 +49,6 @@ describe('Create Key Tests', function () {
52
49
} ) ;
53
50
54
51
describe ( 'Set / Query Value Tests' , function ( ) {
55
- var registry = require ( '../lib/registry' ) ,
56
- windef = require ( '../lib/windef' ) ;
57
52
it ( 'Should set and read REG_SZ Value' , ( ) => {
58
53
var key = registry . openKeyFromPredefined ( windef . HKEY . HKEY_CLASSES_ROOT , '.txt' , windef . KEY_ACCESS . KEY_ALL_ACCESS ) ;
59
54
0 commit comments