import { toBeDeepCloseTo } from 'jest-matcher-deep-close-to';
import { getClasses } from 'ml-dataset-iris';

import { sampleAClass } from '../sampleAClass.js';

expect.extend({ toBeDeepCloseTo });

const metadata = getClasses();

describe('get sample of class', () => {
  it('check length', () => {
    expect(metadata).toHaveLength(150);
  });
  let c = sampleAClass(metadata, 0.1).trainIndex;
  it('check length', () => {
    expect(c).toHaveLength(15);
  });
});

@@ -263,16 +263,66 @@
 () =%3E %7B%0A
+  let c = sampleAClass(metadata, 0.1).trainIndex;%0A
   it('ch
@@ -323,32 +323,36 @@
 it('check length
+ 0.1
 ', () =%3E %7B%0A    e
@@ -357,24 +357,136 @@
  expect(
-metadata
+c).toHaveLength(15);%0A  %7D);%0A  let d = sampleAClass(metadata, 0.2).trainIndex;%0A  it('check length 1', () =%3E %7B%0A    expect(d
 ).toHave
@@ -492,18 +492,17 @@
 eLength(
-15
+3
 0);%0A  %7D)
@@ -505,25 +505,25 @@
   %7D);%0A  let 
-c
+e
  = sampleACl
@@ -530,33 +530,33 @@
 ass(metadata, 0.
-1
+0
 ).trainIndex;%0A  
@@ -571,16 +571,18 @@
 k length
+ 0
 ', () =%3E
@@ -587,33 +587,33 @@
 =%3E %7B%0A    expect(
-c
+e
 ).toHaveLength(1
@@ -603,31 +603,30 @@
 e).toHaveLength(
-15
+0
 );%0A  %7D);%0A%7D);%0A

correct test for sampleAClass