File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,21 @@ describe("Testing transmission of control sequences", function () {
141141 done ( ) ;
142142 } ) ;
143143
144+ it ( "shall transform RGB to milight hue" , function ( done ) {
145+ expect ( index . helper . rgbToHue . apply ( index . helper , [ 255 , 0 , 0 ] ) ) . toBe ( 0xB0 ) ;
146+ done ( ) ;
147+ } ) ;
148+
149+ it ( "shall transform RGB to Milight full color HSV" , function ( done ) {
150+ expect ( index . helper . rgbToFullColorHsv . apply ( index . helper , [ 255 , 0 , 0 ] ) [ 0 ] ) . toBe ( 0xB0 ) ;
151+ done ( ) ;
152+ } ) ;
153+
154+ it ( "shall transform RGB to Milight full color HSV" , function ( done ) {
155+ expect ( index . helper . rgbToFullColorHsv . apply ( index . helper , [ 0 , 255 , 255 ] ) [ 0 ] ) . toBe ( 0x133 ) ;
156+ done ( ) ;
157+ } ) ;
158+
144159 it ( "shall retry if no response" , function ( done ) {
145160 var myLight = new Milight ( {
146161 type : 'v6'
You can’t perform that action at this time.
0 commit comments