Compare commits

...

No commits in common. "master" and "sortNodule" have entirely different histories.

18 changed files with 521 additions and 25 deletions

148
README.md
View File

@ -225,11 +225,128 @@ Only the columns specified in the `structure` object will be exported from the `
export() // get the joined data from the Nodule export() // get the joined data from the Nodule
## GroupByNodule ## GroupByNodule (Experimental)
The `GroupByNodule` class can take in `Table`s and a single value of `groupByValue` to group rows by a table header. On `export()` this will return an object with keys representing an array of objects (or `rows`) <small>This Nodule is experimental and subject to frequent changes.</small>
The `asTable()` method is overloaded and actually returns an array of new `Table` instances, operating differently than the `Nodule` base class `asTable()` The `GroupByNodule` is a sub-class from `Nodule` and can take in `Table`s and a single string value of `groupByValue` to group rows by a table header. Lets use this `Table` and this `Nodule` as our example input data:
```
const table = new Table({
id: 'XYZ',
label: 'Test Table',
rows: [
{ id: 'abc', data: 'row', contractor: 'AshBritt' },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt' },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt' },
{ id: 'XYZ', data: 'row', contractor: 'HeyDay' },
]
})
const groupByNodule = new GroupByNodule({
id: 'ABC',
label: 'Test Group By',
tables: [table],
groupByValue: 'contractor'
})
```
### GroupByNodule Methods
The `Nodule` base class declares an `abstract export () : tableRows`, as well as a base method `asTable (): Table`, yet the `GroupByNodule` subclass does not implement these methods the same as other derivatives of `Nodule`.
In this subclass, there is no return for these methods and an error is thrown. The way data is mutated is a fundamental deviation from other nodules. The `GroupByNodule` is for categorically separating data out, therefore a single set of `rows` or a singular `Table` is not a sufficient return type.
Instead, either groups of `rows` or multiple `Table`s are exported. Two new methods are implemented in this subclass to function in a similar way.
#### exportRowGroups()
```
// TS Types
type tableRow = Record<string, unknown>
type groupedByRows = Record<string, tableRow[]>
exportRowGroups (): groupedByRows
// JS implementation
const groupedRows = groupByNodule.exportRowGroups()
/*
expected output based on example above:
{
AshBritt: [
{ id: 'abc', data: 'row', contractor: 'AshBritt' },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt' },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt' }
],
HeyDay: [
{ id: 'XYZ', data: 'row', contractor: 'HeyDay' }
]
}
*/
```
#### asTables()
```
// TS Type
asTables = (): Table[]
// JS implementation
const groupedTables = groupByNodule.asTables()
/*
expected output based on example above:
{
id: 'ABC-AshBritt',
label: 'Test Group by AshBritt',
rows: [
{ id: 'abc', data: 'row', contractor: 'AshBritt' },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt' },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt' }
],
headers: [ 'id', 'data', 'contractor' ],
type: 'Table',
isValid: true
},
{
id: 'ABC-HeyDay',
label: 'Test Group by HeyDay',
rows: [
{ id: 'XYZ', data: 'row', contractor: 'HeyDay' }
],
headers: [ 'id', 'data', 'contractor' ],
type: 'Table',
isValid: true
}
]
*/
```
## SortNodule (Experimental)
<small>This Nodule is experimental and subject to frequent changes.</small>
The `SortNodule` does one simple task, sort rows based off on particular property/header.
This nodule takes in three new props on top of the properties of the base class:
`sortValueType: 'ALPHABETIC' | 'NUMERIC'` is used to determine if the sorting is based on number or letters.
`sortDirection: 'ASCENDING' | 'DESCENDING'` is used to determine the order of the sorting.
`sortKey: string` is which property/header tha the sorting will be performed on.
```
const sortNodule = new SortNodule({
id: 'ABC',
label: 'Test Nodule',
tables: [table],
sortValueType: 'ALPHABETIC',
sortDirection: 'DESCENDING',
sortKey: 'contractor'
})
```
## Constant Values ## Constant Values
@ -237,15 +354,32 @@ A set of declared constant variables has been provided for safer typing. Althoug
Filter types for the `FilterNodule` can be one of only these five string values. Filter types for the `FilterNodule` can be one of only these five string values.
{ ```
const filterTypes = {
EQUAL: 'EQUAL', EQUAL: 'EQUAL',
GREATER: 'GREATER', GREATER: 'GREATER',
GREATEREQUAL: 'GREATEREQUAL', GREATEREQUAL: 'GREATEREQUAL',
LESSER: 'LESSER', LESSER: 'LESSER',
LESSEREQUAL: 'LESSEREQUAL', LESSEREQUAL: 'LESSEREQUAL',
} }
```
`SortNodule` constants are as follows:
```
const sortDirections = {
ASCENDING: 'ASCENDING',
DESCENDING: 'DESCENDING'
}
const sortValueTypes = {
NUMERIC: 'NUMERIC',
ALPHABETIC: 'ALPHABETIC'
}
```
# Notes # Notes
This library is in its early stages, and improvements are to come. The main priority being speed and readability when using the options in these classes. Extra features are not the priority, but will be worked on. Adding features is agains the philosophy of this project however. Lovelacejs is to be a powerful building block to making dynamic and programatic data mutation. It is to be a tool to help craft software, not a wall that gets in the way of work. This library is in its early stages, and improvements are to come. The main priority currently is readability. Experimental features, which are labeled as such, will likely change functionality and naming.
If you have any questions or issues please open one up or reach out to me at `joshua@jshoemaker.dev` Goals moving forward are to finalize the experimental features and try to move the core of the code base to WASM with Go and a JS/TS api.

9
lib/constants/sortTypes.d.ts vendored Normal file
View File

@ -0,0 +1,9 @@
declare const sortDirections: {
ASCENDING: string;
DESCENDING: string;
};
declare const sortValueTypes: {
NUMERIC: string;
ALPHABETIC: string;
};
export { sortDirections, sortValueTypes };

View File

@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sortValueTypes = exports.sortDirections = void 0;
const sortDirections = {
ASCENDING: 'ASCENDING',
DESCENDING: 'DESCENDING'
};
exports.sortDirections = sortDirections;
const sortValueTypes = {
NUMERIC: 'NUMERIC',
ALPHABETIC: 'ALPHABETIC'
};
exports.sortValueTypes = sortValueTypes;

View File

@ -5,7 +5,7 @@ declare class FilterNodule extends Nodule {
filterParams: filterParams; filterParams: filterParams;
constructor(props: filterNoduleConstructionProps); constructor(props: filterNoduleConstructionProps);
addFilter: (params: filterParams) => void; addFilter: (params: filterParams) => void;
setFilterType: (filterType: filterType) => void; setFilterType: (filterType: string) => void;
export: () => import("../../types/tableTypes").tableRow[]; export: () => import("../../types/tableTypes").tableRow[];
private createFilterMethods; private createFilterMethods;
private validateFilters; private validateFilters;

View File

@ -7,7 +7,7 @@ declare class GroupByNodule extends Nodule {
asTables: () => Table[]; asTables: () => Table[];
asTable: () => never; asTable: () => never;
export: () => never; export: () => never;
exportTables: () => groupedByRows; exportRowGroups: () => groupedByRows;
setGroupByValue: (value: string) => void; setGroupByValue: (value: string) => void;
private validateGroupByValue; private validateGroupByValue;
} }

View File

@ -10,7 +10,7 @@ class GroupByNodule extends Nodule_1.default {
this.setGroupByValue(props.groupByValue); this.setGroupByValue(props.groupByValue);
} }
asTables = () => { asTables = () => {
const exports = this.exportTables(); const exports = this.exportRowGroups();
const tables = []; const tables = [];
for (let key in exports) { for (let key in exports) {
const newTableProps = { const newTableProps = {
@ -29,7 +29,7 @@ class GroupByNodule extends Nodule_1.default {
export = () => { export = () => {
throw new Error('"export()" can not be called by GroupByNodule. Call "exportTables()"'); throw new Error('"export()" can not be called by GroupByNodule. Call "exportTables()"');
}; };
exportTables = () => { exportRowGroups = () => {
const { groupByValue } = this; const { groupByValue } = this;
const rows = this.tables.map(t => t.export()).flat(); const rows = this.tables.map(t => t.export()).flat();
const groupedByRows = rows.reduce((groups, r) => { const groupedByRows = rows.reduce((groups, r) => {

11
lib/entities/nodules/SortNodule.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
import { sortDirection, sortKey, sortNoduleConstructorProps, sortValueType } from '../../types/noduleTypes';
import { tableRow } from '../../types/tableTypes';
import Nodule from '../Nodule';
declare class SortNodule extends Nodule {
sortValueType: sortValueType;
sortDirection: sortDirection;
sortKey: sortKey;
constructor(props: sortNoduleConstructorProps);
export: () => tableRow[];
}
export default SortNodule;

View File

@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sortTypes_1 = require("../../constants/sortTypes");
const Nodule_1 = require("../Nodule");
class SortNodule extends Nodule_1.default {
sortValueType = sortTypes_1.sortValueTypes.ALPHABETIC;
sortDirection = sortTypes_1.sortDirections.ASCENDING;
sortKey = '';
constructor(props) {
super(props);
const { sortValueType, sortDirection, sortKey } = props;
if (sortValueType)
this.sortValueType = sortValueType;
if (sortDirection)
this.sortDirection = sortDirection;
if (sortKey)
this.sortKey = sortKey;
}
export = () => {
const { sortValueType, sortDirection, sortKey } = this;
const { NUMERIC } = sortTypes_1.sortValueTypes;
const { DESCENDING } = sortTypes_1.sortDirections;
let sortMethod;
if (sortValueType === NUMERIC)
sortMethod = (a, b) => {
const aValue = a[sortKey];
const bValue = b[sortKey];
return aValue - bValue;
};
else
sortMethod = (a, b) => {
const aValue = a[sortKey];
const bValue = b[sortKey];
return aValue.toLowerCase().localeCompare(bValue.toLowerCase());
};
let rows = this.tables.map(t => t.export()).flat().sort(sortMethod);
if (sortDirection === DESCENDING)
rows = rows.reverse();
return rows;
};
}
exports.default = SortNodule;

View File

@ -30,7 +30,7 @@ class TransformNodule extends Nodule_1.default {
const err = { const err = {
status: 'ERR', status: 'ERR',
error: { error: {
label: 'Ptructure Parameters are not valid', label: 'Structure Parameters are not valid',
messages: [] messages: []
} }
}; };

View File

@ -1,3 +1,5 @@
import filterTypes from "../constants/filterTypes";
import { sortValueTypes, sortDirections } from "../constants/sortTypes";
import Table from "../entities/Table"; import Table from "../entities/Table";
import { tableRow } from "./tableTypes"; import { tableRow } from "./tableTypes";
declare type noduleConstructorProps = { declare type noduleConstructorProps = {
@ -6,7 +8,9 @@ declare type noduleConstructorProps = {
type?: 'Nodule'; type?: 'Nodule';
tables?: Table[]; tables?: Table[];
}; };
declare type filterType = 'EQUAL' | 'GREATER' | 'GREATEREQUAL' | 'LESSER' | 'LESSEREQUAL'; declare type filterKeys = keyof typeof filterTypes;
declare type filterValues = typeof filterTypes[filterKeys];
declare type filterType = filterValues;
declare type filterParams = Record<string, string | number>; declare type filterParams = Record<string, string | number>;
declare type filterNoduleConstructionProps = noduleConstructorProps & { declare type filterNoduleConstructionProps = noduleConstructorProps & {
filterType: filterType; filterType: filterType;
@ -33,4 +37,16 @@ declare type groupByNoduleConstructorProps = noduleConstructorProps & {
groupByValue: string; groupByValue: string;
}; };
declare type groupedByRows = Record<string, tableRow[]>; declare type groupedByRows = Record<string, tableRow[]>;
export { noduleConstructorProps, filterNoduleConstructionProps, filterType, filterParams, joinParam, joinBy, joinNoduleConstructionProps, transformStruct, transformNoduleConstructionProps, groupByNoduleConstructorProps, groupedByRows }; declare type sortDirectionKeys = keyof typeof sortDirections;
declare type sortDirectionValues = typeof sortDirections[sortDirectionKeys];
declare type sortDirection = sortDirectionValues;
declare type sortValueTypeKeys = keyof typeof sortValueTypes;
declare type sortValueTypeValues = typeof sortValueTypes[sortValueTypeKeys];
declare type sortValueType = sortValueTypeValues;
declare type sortKey = string;
declare type sortNoduleConstructorProps = noduleConstructorProps & {
sortDirection: sortDirection;
sortValueType: sortValueType;
sortKey: sortKey;
};
export { noduleConstructorProps, filterNoduleConstructionProps, filterType, filterParams, joinParam, joinBy, joinNoduleConstructionProps, transformStruct, transformNoduleConstructionProps, groupByNoduleConstructorProps, groupedByRows, sortDirection, sortValueType, sortKey, sortNoduleConstructorProps, };

View File

@ -0,0 +1,11 @@
const sortDirections = {
ASCENDING: 'ASCENDING',
DESCENDING: 'DESCENDING'
}
const sortValueTypes = {
NUMERIC: 'NUMERIC',
ALPHABETIC: 'ALPHABETIC'
}
export { sortDirections, sortValueTypes }

View File

@ -13,7 +13,7 @@ class GroupByNodule extends Nodule {
} }
asTables = (): Table[] => { asTables = (): Table[] => {
const exports = this.exportTables() const exports = this.exportRowGroups()
const tables = [] const tables = []
for (let key in exports) { for (let key in exports) {
const newTableProps: tableConstructorProps = { const newTableProps: tableConstructorProps = {
@ -35,7 +35,7 @@ class GroupByNodule extends Nodule {
throw new Error('"export()" can not be called by GroupByNodule. Call "exportTables()"') throw new Error('"export()" can not be called by GroupByNodule. Call "exportTables()"')
} }
exportTables = (): groupedByRows => { exportRowGroups = (): groupedByRows => {
const { groupByValue } = this const { groupByValue } = this
const rows = this.tables.map(t => t.export() ).flat() const rows = this.tables.map(t => t.export() ).flat()
const groupedByRows = rows.reduce((groups: groupedByRows, r) => { const groupedByRows = rows.reduce((groups: groupedByRows, r) => {

View File

@ -0,0 +1,44 @@
import { sortDirections, sortValueTypes } from '../../constants/sortTypes'
import { sortDirection, sortKey, sortNoduleConstructorProps, sortValueType } from '../../types/noduleTypes'
import { tableRow } from '../../types/tableTypes'
import Nodule from '../Nodule'
class SortNodule extends Nodule {
sortValueType: sortValueType = sortValueTypes.ALPHABETIC
sortDirection: sortDirection = sortDirections.ASCENDING
sortKey: sortKey = ''
constructor (props: sortNoduleConstructorProps) {
super(props)
const { sortValueType, sortDirection, sortKey } = props
if (sortValueType) this.sortValueType = sortValueType
if (sortDirection) this.sortDirection = sortDirection
if (sortKey) this.sortKey = sortKey
}
export = () => {
const { sortValueType, sortDirection, sortKey } = this
const { NUMERIC } = sortValueTypes
const { DESCENDING } = sortDirections
let sortMethod
if (sortValueType === NUMERIC) sortMethod = (a: tableRow, b: tableRow) => {
const aValue = a[sortKey] as number
const bValue = b[sortKey] as number
return aValue - bValue
}
else sortMethod = (a: tableRow, b: tableRow) => {
const aValue = a[sortKey] as string
const bValue = b[sortKey] as string
return aValue.toLowerCase().localeCompare(bValue.toLowerCase())
}
let rows = this.tables.map(t => t.export()).flat().sort(sortMethod)
if (sortDirection === DESCENDING) rows = rows.reverse()
return rows
}
}
export default SortNodule

View File

@ -34,7 +34,7 @@ class TransformNodule extends Nodule {
const err: errType = { const err: errType = {
status: 'ERR', status: 'ERR',
error: { error: {
label: 'Ptructure Parameters are not valid', label: 'Structure Parameters are not valid',
messages: [] messages: []
} }
} }

View File

@ -1,4 +1,5 @@
import filterTypes from "../constants/filterTypes" import filterTypes from "../constants/filterTypes"
import { sortValueTypes, sortDirections } from "../constants/sortTypes"
import Table from "../entities/Table" import Table from "../entities/Table"
import { tableRow } from "./tableTypes" import { tableRow } from "./tableTypes"
@ -26,6 +27,17 @@ type groupByNoduleConstructorProps = noduleConstructorProps & { groupByValue: st
type groupedByRows = Record<string, tableRow[]> type groupedByRows = Record<string, tableRow[]>
type sortDirectionKeys = keyof typeof sortDirections
type sortDirectionValues = typeof sortDirections[sortDirectionKeys]
type sortDirection = sortDirectionValues
type sortValueTypeKeys = keyof typeof sortValueTypes
type sortValueTypeValues = typeof sortValueTypes[sortValueTypeKeys]
type sortValueType = sortValueTypeValues
type sortKey = string
type sortNoduleConstructorProps = noduleConstructorProps & { sortDirection: sortDirection, sortValueType: sortValueType, sortKey: sortKey }
export { export {
noduleConstructorProps, noduleConstructorProps,
filterNoduleConstructionProps, filterNoduleConstructionProps,
@ -37,5 +49,9 @@ export {
transformStruct, transformStruct,
transformNoduleConstructionProps, transformNoduleConstructionProps,
groupByNoduleConstructorProps, groupByNoduleConstructorProps,
groupedByRows groupedByRows,
sortDirection,
sortValueType,
sortKey,
sortNoduleConstructorProps,
} }

View File

@ -42,7 +42,7 @@ const groupByTest = () => {
return false return false
} }
const groupedRows = groupByNodule.exportTables() const groupedRows = groupByNodule.exportRowGroups()
if (JSON.stringify(groupedRows) === JSON.stringify(expectedOutput)) { if (JSON.stringify(groupedRows) === JSON.stringify(expectedOutput)) {
return true return true
} else { } else {

View File

@ -0,0 +1,198 @@
import SortNodule from '../../../src/entities/nodules/SortNodule'
import Table from '../../../src/entities/Table'
const sortNumericAscending = () => {
const expectedOutput = [
{ id: 'XYZ', data: 'row', contractor: 'AshBritt', someNumber: 1 },
{ id: 'XYZ', data: 'row', contractor: 'HeyDay', someNumber: 4 },
{ id: 'abc', data: 'row', contractor: 'AshBritt', someNumber: 9 },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt', someNumber: 11 },
]
let table = {}
try {
table = new Table({
id: 'XYZ',
label: 'Test Table',
rows: [
{ id: 'abc', data: 'row', contractor: 'AshBritt', someNumber: 9 },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt', someNumber: 11 },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt', someNumber: 1 },
{ id: 'XYZ', data: 'row', contractor: 'HeyDay', someNumber: 4 },
]
})
} catch (err) {
return false
}
let sortNodule = {}
try {
sortNodule = new SortNodule({
id: 'ABC',
label: 'Test Nodule',
tables: [table],
sortValueType: 'NUMERIC',
sortDirection: 'ASCENDING',
sortKey: 'someNumber'
})
} catch (err) {
console.log(err)
return false
}
const sortedRows = sortNodule.export()
if (JSON.stringify(sortedRows) === JSON.stringify(expectedOutput)) {
return true
} else {
return false
}
}
const sortNumericDesscending = () => {
const expectedOutput = [
{ id: 'qwe', data: 'lh', contractor: 'AshBritt', someNumber: 11 },
{ id: 'abc', data: 'row', contractor: 'AshBritt', someNumber: 9 },
{ id: 'XYZ', data: 'row', contractor: 'HeyDay', someNumber: 4 },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt', someNumber: 1 },
]
let table = {}
try {
table = new Table({
id: 'XYZ',
label: 'Test Table',
rows: [
{ id: 'abc', data: 'row', contractor: 'AshBritt', someNumber: 9 },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt', someNumber: 11 },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt', someNumber: 1 },
{ id: 'XYZ', data: 'row', contractor: 'HeyDay', someNumber: 4 },
]
})
} catch (err) {
return false
}
let sortNodule = {}
try {
sortNodule = new SortNodule({
id: 'ABC',
label: 'Test Nodule',
tables: [table],
sortValueType: 'NUMERIC',
sortDirection: 'DESCENDING',
sortKey: 'someNumber'
})
} catch (err) {
console.log(err)
return false
}
const sortedRows = sortNodule.export()
if (JSON.stringify(sortedRows) === JSON.stringify(expectedOutput)) {
return true
} else {
return false
}
}
const sortAlphabeticAscending = () => {
const expectedOutput = [
{ id: 'abc', data: 'row', contractor: 'AshBritt', someNumber: 9 },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt', someNumber: 11 },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt', someNumber: 1 },
{ id: 'XYZ', data: 'row', contractor: 'HeyDay', someNumber: 4 },
]
let table = {}
try {
table = new Table({
id: 'XYZ',
label: 'Test Table',
rows: [
{ id: 'abc', data: 'row', contractor: 'AshBritt', someNumber: 9 },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt', someNumber: 11 },
{ id: 'XYZ', data: 'row', contractor: 'HeyDay', someNumber: 4 },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt', someNumber: 1 },
]
})
} catch (err) {
return false
}
let sortNodule = {}
try {
sortNodule = new SortNodule({
id: 'ABC',
label: 'Test Nodule',
tables: [table],
sortValueType: 'ALPHABETIC',
sortDirection: 'ASCENDING',
sortKey: 'contractor'
})
} catch (err) {
console.log(err)
return false
}
const sortedRows = sortNodule.export()
if (JSON.stringify(sortedRows) === JSON.stringify(expectedOutput)) {
return true
} else {
return false
}
}
const sortAlphabeticDescending = () => {
const expectedOutput = [
{ id: 'XYZ', data: 'row', contractor: 'HeyDay', someNumber: 4 },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt', someNumber: 1 },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt', someNumber: 11 },
{ id: 'abc', data: 'row', contractor: 'AshBritt', someNumber: 9 },
]
let table = {}
try {
table = new Table({
id: 'XYZ',
label: 'Test Table',
rows: [
{ id: 'abc', data: 'row', contractor: 'AshBritt', someNumber: 9 },
{ id: 'qwe', data: 'lh', contractor: 'AshBritt', someNumber: 11 },
{ id: 'XYZ', data: 'row', contractor: 'HeyDay', someNumber: 4 },
{ id: 'XYZ', data: 'row', contractor: 'AshBritt', someNumber: 1 },
]
})
} catch (err) {
return false
}
let sortNodule = {}
try {
sortNodule = new SortNodule({
id: 'ABC',
label: 'Test Nodule',
tables: [table],
sortValueType: 'ALPHABETIC',
sortDirection: 'DESCENDING',
sortKey: 'contractor'
})
} catch (err) {
console.log(err)
return false
}
const sortedRows = sortNodule.export()
if (JSON.stringify(sortedRows) === JSON.stringify(expectedOutput)) {
return true
} else {
return false
}
}
export default [
{ name: 'Entities | Sort Nodule Numeric Ascending', test: sortNumericAscending },
{ name: 'Entities | Sort Nodule Numeric Descending', test: sortNumericDesscending },
{ name: 'Entities | Sort Nodule Alphabetic Ascending', test: sortAlphabeticAscending },
{ name: 'Entities | Sort Nodule Alphabetic Descending', test: sortAlphabeticDescending },
]

View File

@ -6,6 +6,7 @@ import filterNoduleTests from './core/nodules/filterNoduleTests.js'
import joinNoduleTests from './core/nodules/joinNoduleTests.js' import joinNoduleTests from './core/nodules/joinNoduleTests.js'
import transformNoduleTests from './core/nodules/transformNoduleTests.js' import transformNoduleTests from './core/nodules/transformNoduleTests.js'
import groupByNoduleTests from './core/nodules/groupByNoduleTests.js' import groupByNoduleTests from './core/nodules/groupByNoduleTests.js'
import sortNoduleTests from './core/nodules/sortNoduleTests.js'
type unitTest = { name: string, test: Function } type unitTest = { name: string, test: Function }
@ -38,7 +39,8 @@ const testsArray = [
filterNoduleTests, filterNoduleTests,
joinNoduleTests, joinNoduleTests,
transformNoduleTests, transformNoduleTests,
groupByNoduleTests groupByNoduleTests,
sortNoduleTests,
] ]
init (testsArray.flat()) init (testsArray.flat())