feat: tests

This commit is contained in:
2023-04-21 12:08:35 +02:00
parent 8cb9285462
commit d8c79256c9
140 changed files with 2100 additions and 2693 deletions

View File

@@ -12,8 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {chunk} from '../src/chunk.js';
import {chunk} from '../src/index.js';
import {expect} from 'chai';
describe('chunk', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {differenceBy} from '../src/difference.js';
import {differenceBy} from '../src/index.js';
import {expect} from 'chai';
describe('differenceBy', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {get} from '../src/get.js';
import {get} from '../src/index.js';
import {expect} from 'chai';
describe('get', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {groupBy, groupByStable, groupByProperty} from '../src/group-by.js';
import {groupBy, groupByStable, groupByProperty} from '../src/index.js';
import {expect} from 'chai';
describe('groupBy', () => {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {keyBy} from '../src/key-by.js';
import {keyBy} from '../src/index.js';
import {expect} from 'chai';
describe('keyBy', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {mapValues} from '../src/map-values.js';
import {mapValues} from '../src/index.js';
import {expect} from 'chai';
describe('map-values', () => {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {minBy} from '../src/min.js';
import {minBy} from '../src/index.js';
import {expect} from 'chai';
describe('minBy', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {omit} from '../src/omit.js';
import {omit} from '../src/index.js';
import {expect} from 'chai';
describe('omit', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {partition} from '../src/partition.js';
import {partition} from '../src/index.js';
import {expect} from 'chai';
describe('partition', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {pick} from '../src/pick.js';
import {pick} from '../src/index.js';
import {expect} from 'chai';
describe('pick', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {shuffle} from '../src/shuffle.js';
import {shuffle} from '../src/index.js';
import {expect} from 'chai';
describe('shuffle', function () {

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {stringSort, stringSortBy} from '../src/string-sort.js';
import {stringSort, stringSortBy} from '../src/index.js';
import {expect} from 'chai';
describe('stringSort', () => {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {expect} from 'chai';
import {sum, sumBy} from '../src/sum.js';
import {sum, sumBy} from '../src/index.js';
describe('sum', () => {
it('should return the sum of all elements in the collection', () => {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {expect} from 'chai';
import {Tree, treeGroupBy} from '../src/tree-group.js';
import {Tree, treeGroupBy} from '../src/index.js';
interface TestItem {
id: number;

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {expect} from 'chai';
import {uniqBy} from '../src/uniq.js';
import {uniqBy} from '../src/index.js';
describe('uniq', function () {
it('should return an array with unique values', function () {

View File

@@ -13,7 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {expect} from 'chai';
import {zip} from '../src/zip.js';
import {zip} from '../src/index.js';
describe('zip', function () {
it('should zip arrays together', function () {