mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
feat: tests
This commit is contained in:
@@ -6,20 +6,20 @@
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"build": "tsup --dts",
|
||||
"format": "prettier .",
|
||||
"format:fix": "prettier --write .",
|
||||
"format": "prettier . --ignore-path ../../.gitignore",
|
||||
"format:fix": "prettier --write . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint --ext .ts src/",
|
||||
"lint:fix": "eslint --fix --ext .ts src/",
|
||||
"test": "nyc mocha 'test/**/*.spec.ts'"
|
||||
"test": "c8 mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
"@openstapps/nyc-config": "workspace:*",
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/chai": "4.3.4",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@types/node": "18.15.3",
|
||||
"c8": "7.13.0",
|
||||
"chai": "4.3.7",
|
||||
"mocha": "10.2.0",
|
||||
"ts-node": "10.9.1",
|
||||
@@ -41,8 +41,5 @@
|
||||
"@openstapps"
|
||||
]
|
||||
},
|
||||
"nyc": {
|
||||
"extends": "@openstapps/nyc-config"
|
||||
},
|
||||
"exports": "./lib/index.js"
|
||||
}
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user