@@ -84,7 +84,7 @@ describe('core', () => {
8484 const points2 = [
8585 [ 0 , 0 ] , [ 1000 , 900 ] , [ - 1000 , - 900 ] , [ - 1100 , - 1000 ] , [ 1100 , 1000 ] , [ 10 , 10 ]
8686 ] . map ( ( [ x , y ] ) => new cv . Point ( x , y ) ) ;
87-
87+
8888 const k = 3 ;
8989 const termCriteria = new cv . TermCriteria ( cv . termCriteria . COUNT , 100 , 0.8 ) ;
9090 const attempts = 10 ;
@@ -119,12 +119,12 @@ describe('core', () => {
119119 expect ( ret . centers [ l2 ] . x ) . to . equal ( - 1050 ) ;
120120 expect ( ret . centers [ l2 ] . y ) . to . equal ( - 950 ) ;
121121 } ) ;
122-
122+
123123 // related to https://github.com/justadudewhohacks/opencv4nodejs/issues/379
124124 const points3 = [
125125 [ 255 , 0 , 0 ] , [ 255 , 0 , 0 ] , [ 255 , 0 , 255 ] , [ 255 , 0 , 255 ] , [ 255 , 255 , 255 ]
126- ] . map ( ( [ x , y , z ] ) => new cv . Point ( x , y , z ) ) ;
127-
126+ ] . map ( ( [ x , y , z ] ) => new cv . Point ( x , y , z ) ) ;
127+
128128 it ( 'should return correct centers with Point3' , ( ) => {
129129 const ret = cv . kmeans ( points3 , k , termCriteria , attempts , flags ) ;
130130
@@ -144,10 +144,10 @@ describe('core', () => {
144144 it ( 'should raise error for invalid type' , ( ) => {
145145 const points3 = [
146146 [ 255 , 0 , 0 ] , [ 255 , 0 , 0 ] , [ 255 , 0 , 255 ] , [ 255 , 0 , 255 ] , [ 255 , 255 , 255 ]
147- ] . map ( ( [ x , y , z ] ) => new cv . Vec ( x , y , z ) ) ;
148-
147+ ] . map ( ( [ x , y , z ] ) => new cv . Vec ( x , y , z ) ) ;
148+
149149 let err ;
150-
150+
151151 try {
152152 cv . kmeans ( points3 , k , termCriteria , attempts , flags ) ;
153153 } catch ( e ) {
@@ -157,7 +157,7 @@ describe('core', () => {
157157 expect ( err . message ) . to . equal ( "Core::Kmeans - expected arg0 to be an Array of Points" ) ;
158158 } ) ;
159159 } ) ;
160-
160+
161161 describe ( 'cartToPolar' , ( ) => {
162162 const x = new cv . Mat ( [ [ 0 , 1 , 100 ] ] , cv . CV_32F ) ;
163163 const y = new cv . Mat ( [ [ 0 , 1 , 100 ] ] , cv . CV_32F ) ;
@@ -267,7 +267,7 @@ describe('core', () => {
267267 } ) ;
268268 } ) ;
269269
270- if ( asyncHooks ) {
270+ if ( asyncHooks && ! process . env . DISABLE_ASYNC_HOOKS_TEST ) {
271271 describe ( 'async_hooks' , ( ) => {
272272 it ( 'should trigger `init` callback in async_hooks' , ( ) => {
273273 let typeFound = false
0 commit comments