Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #18

Closed
fivdi opened this issue Dec 14, 2020 · 1 comment
Closed

Fix tests #18

fivdi opened this issue Dec 14, 2020 · 1 comment

Comments

@fivdi
Copy link
Owner

fivdi commented Dec 14, 2020

Some of the tests no longer function as expected on Linux version 5.4.79-v7+ and need to be updated.
See also #16.

Here is the console output shown when the tests are run:

default-options
node:assert:107
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: default chipSelectHigh incorrect
    at checkDefaultOptions (/home/pi/mcp-spi-adc/node_modules/spi-device/test/default-options.js:8:10)
    at checkOptions (/home/pi/mcp-spi-adc/node_modules/spi-device/test/default-options.js:19:3)
    at Object.<anonymous> (/home/pi/mcp-spi-adc/node_modules/spi-device/test/default-options.js:30:1)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: true,
  expected: false,
  operator: 'strictEqual'
}
options
options-sync
node:assert:107
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: can't set chipSelectHigh
    at Object.<anonymous> (/home/pi/mcp-spi-adc/node_modules/spi-device/test/options-sync.js:32:8)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  generatedMessage: false,
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: 'strictEqual'
}
message-size
/home/pi/mcp-spi-adc/node_modules/spi-device/test/message-size.js:30
  mcp3008.transferSync(createMessage(511)); // works
          ^

Error: EMSGSIZE, Message too long
    at transferAsManyAsPossible (/home/pi/mcp-spi-adc/node_modules/spi-device/test/message-size.js:30:11)
    at Object.<anonymous> (/home/pi/mcp-spi-adc/node_modules/spi-device/test/message-size.js:66:1)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  errno: 90,
  code: 'EMSGSIZE',
  syscall: 'transferSync'
}
transfer
@fivdi
Copy link
Owner Author

fivdi commented Apr 30, 2021

Fixed by 9fa6c12 and 5ee14a5.

@fivdi fivdi closed this as completed Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant