node-loudness
node-loudness copied to clipboard
Tests failed in Ubuntu 16.04 LTS
Running npm test
in the module in Ubuntu 16.04 LTS x64 is not passing any of the tests, :-1:
> [email protected] test /.../node-loudness
> mocha
loudness
1) should set and get the volume
2) should set and get the mute state
3) "after all" hook
0 passing (96ms)
3 failing
1) loudness should set and get the volume:
Uncaught AssertionError: 16 == 15
+ expected - actual
-16
+15
at test/basics.js:47:16
at impl/linux.js:76:7
at impl/linux.js:60:13
at ChildProcess.<anonymous> (impl/linux.js:19:5)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
2) loudness should set and get the mute state:
Uncaught Error: Alsa Mixer Error: amixer: Invalid command!
at Socket.<anonymous> (impl/linux.js:15:11)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:548:20)
3) loudness "after all" hook:
Error: Alsa Mixer Error: amixer: Invalid command!
at Socket.<anonymous> (impl/linux.js:15:11)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:548:20)
Referring to this, https://ubuntuforums.org/showthread.php?t=1796713&p=12655641#post12655641
amixer -D pulse set Master mute
amixer -D pulse set Master unmute
This command works fine.
That's unfortunate, pull requests welcome!