kessler / node-regedit

Read, Write, List and do all sorts of funky stuff to the windows registry using node.js and windows script host
MIT License
279 stars 45 forks source link

Tests fail as the result of case-sensitive key matching #36

Closed nhz-io closed 7 years ago

nhz-io commented 7 years ago

Tests on my local vm (WIN10 x64)

The test is looking for Software key and its there, just full caps SOFTWARE As the keys in registry are case-insensitive imho we should ignore case in tests

  1) regedit list keys and values in a sub key can be applied to several independant keys at once:
     Uncaught AssertionError: expected [
  'AppEvents',
  'AppXBackupContentType',
  'System',
  'Volatile Environment',
  'Console',
  'Control Panel',
  'Environment',
  'EUDC',
  'Keyboard Layout',
  'Network',
  'Printers',
  'SOFTWARE'
] to contain 'Software'
      at Proxy.fail (E:\node-regedit\node_modules\should\lib\assertion.js:228:17)
      at Proxy.prop.(anonymous function) (E:\node-regedit\node_modules\should\lib\assertion.js:69:14)
      at E:\node-regedit\test\regedit.test.js:110:41
      at E:\node-regedit\index.js:243:13
      at ChildProcess.exithandler (child_process.js:197:7)
      at maybeClose (internal/child_process.js:877:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
nhz-io commented 7 years ago

Tests on Appveyor

Similar cases happen on Appveyor (Probably because of different Windows version)

 1) regedit list keys and values in a sub key HKLM\software\microsoft\windows\CurrentVersion 64bit:
     Uncaught AssertionError: expected [
  'AccountPicture',
  'AdvertisingInfo',
  'Authentication',
  'AutoRotation',
  'BITS',
  'CEIPData',
  'CEIPRole',
  'Component Based Servicing',
  'ConnectedSearch',
  'Control Panel',
  'Controls Folder',
  'DateTime',
  'App Management',
  'Device Installer',
  'Device Metadata',
  'DeviceAccess',
  'DeviceSetup',
  'Diagnostics',
  'DPX',
  'DriverSearching',
  'EventCollector',
  'EventForwarding',
  'Explorer',
  'App Paths',
  'Ext',
  'FlightsInformation',
  'Group Policy',
  'GWX',
  'HelpAndSupport',
  'Hints',
  'HomeGroup',
  'IME',
  'ImmersiveShell',
  'Installer',
  'AppHost',
  'Internet Settings',
  'Lock Screen',
  'Management Infrastructure',
  'Media Center',
  'MMDevices',
  'NetCache',
  'NetworkServiceTriggers',
  'OEMInformation',
  'OOBE',
  'OpenWith',
  'Applets',
  'Parental Controls',
  'Personalization',
  'PhotoPropertyHandler',
  'policies',
  'PrecisionTouchPad',
  'PreviewHandlers',
  'PropertySystem',
  'PushNotifications',
  'Reliability',
  'RenameFiles',
  'AppModel',
  'Run',
  'RunOnce',
  'SelectiveRemoteWipe',
  'SettingSync',
  'Setup',
  'SharedDLLs',
  'Shell Extensions',
  'ShellCompatibility',
  'ShellServiceObjectDelayLoad',
  'SideBySide',
  'AppReadiness',
  'SMDEn',
  'SMI',
  'Store',
  'StructuredQuery',
  'Syncmgr',
  'SyncShareSrv',
  'SysPrepTapi',
  'SystemProtectedUserData',
  'Tablet PC',
  'Telephony',
  'Appx',
  'ThemeManager',
  'Themes',
  'TouchKeyboard',
  'Uninstall',
  'URL',
  'UserPictureChange',
  'UserState',
  'Utilman',
  'WebCheck',
  'WindowsStore',
  'Audio',
  'WindowsUpdate',
  'WINEVT',
  'Wordpad',
  'WSMAN',
  'WUSA',
  'XWizards'
] to contain 'Policies'
      at Proxy.fail (C:\projects\node-regedit\node_modules\should\lib\assertion.js:228:17)
      at Proxy.prop.(anonymous function) (C:\projects\node-regedit\node_modules\should\lib\assertion.js:69:14)
      at C:\projects\node-regedit\test\regedit.test.js:68:33
      at C:\projects\node-regedit\index.js:243:13
      at ChildProcess.exithandler (child_process.js:195:7)
      at maybeClose (internal/child_process.js:886:16)
      at Socket.<anonymous> (internal/child_process.js:342:11)
      at Pipe._handle.close [as _onclose] (net.js:497:12)