diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index f4c4eae..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = {
- root: true,
- parser: '@typescript-eslint/parser',
- plugins: ['@typescript-eslint'],
- extends: [
- 'eslint:recommended',
- 'plugin:@typescript-eslint/recommended',
- 'prettier/@typescript-eslint',
- ],
- parserOptions: {
- ecmaVersion: 2020,
- sourceType: 'module',
- ecmaFeatures: {
- jsx: true,
- },
- },
- rules: {},
- settings: {},
-};
diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml
index 2882bf0..176d02b 100644
--- a/.github/workflows/development.yml
+++ b/.github/workflows/development.yml
@@ -5,6 +5,9 @@ on:
branches:
- development
+env:
+ CI: true
+
jobs:
build:
runs-on: ${{ matrix.os }}
@@ -26,13 +29,9 @@ jobs:
- name: npm install
run: |
npm install
- env:
- CI: true
- name: code coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
- env:
- CI: true
diff --git a/.github/workflows/feature.yml b/.github/workflows/feature.yml
index 4775a58..f2b31b6 100644
--- a/.github/workflows/feature.yml
+++ b/.github/workflows/feature.yml
@@ -5,6 +5,9 @@ on:
branches:
- feature/*
+env:
+ CI: true
+
jobs:
build:
runs-on: ${{ matrix.os }}
@@ -26,13 +29,9 @@ jobs:
- name: npm install
run: |
npm install
- env:
- CI: true
- name: code coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
- env:
- CI: true
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index b9d8fc1..9e93c0a 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -5,6 +5,10 @@ on:
branches:
- master
+env:
+ CI: true
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
jobs:
build:
runs-on: ${{ matrix.os }}
@@ -26,37 +30,30 @@ jobs:
- name: npm install
run: |
npm install
- env:
- CI: true
- name: code coverage
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/coverage/lcov.info
+ - name: publish code coverage to code climate
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
+ uses: paambaati/codeclimate-action@v2.6.0
env:
- CI: true
- # - name: publish code coverage to code climate
- # if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
- # uses: paambaati/codeclimate-action@v2.3.0
- # env:
- # CI: true
- # CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
- # with:
- # coverageCommand: npm run test
- # coverageLocations: |
- # ./test/coverage/lcov.info:lcov
- # debug: true
- # - name: create release
- # if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
- # id: createrelease
- # uses: gregoranders/nodejs-create-release@v0.0.6
- # env:
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- # PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
- # with:
- # tag: v${{ steps.projectinfo.outputs.version }}
- # name: ${{ steps.projectinfo.outputs.version }} Release
- # body: ${{ steps.projectinfo.outputs.name }} - ${{ steps.projectinfo.outputs.version }} Release
- # target: ${{ github.ref }}
- # draft: true
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
+ with:
+ coverageCommand: npm run test
+ coverageLocations: |
+ ./test/coverage/lcov.info:lcov
+ - name: create release
+ if: matrix.os == 'ubuntu-latest' && matrix.node-version == '14.x'
+ id: createrelease
+ uses: gregoranders/nodejs-create-release@v0.0.6
+ env:
+ PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
+ with:
+ tag: v${{ steps.projectinfo.outputs.version }}
+ name: ${{ steps.projectinfo.outputs.version }} Release
+ body: ${{ steps.projectinfo.outputs.name }} - ${{ steps.projectinfo.outputs.version }} Release
+ target: ${{ github.ref }}
+ draft: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..28e7550
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,37 @@
+name: Release CI
+
+on:
+ release:
+ types:
+ - edited
+
+env:
+ CI: true
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ node-version: [14.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: nodejs project information
+ id: projectinfo
+ uses: gregoranders/nodejs-project-info@v0.0.6
+ - name: npm install
+ run: |
+ npm install
+ - name: npm publish
+ env:
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ run: |
+ npm publish --access public
diff --git a/.npmignore b/.npmignore
deleted file mode 100644
index 7b986e3..0000000
--- a/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-api/
-dist/
-docs/
-CHANGELOG.md
-SECURITY.md
-README.md
-LICENSE
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b9df711..4a79946 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,47 @@
+#### 0.0.4 (2020-06-20)
+
+##### Build System / Dependencies
+
+* **release:** add release workflow ([0e68a0e4](https://github.com/gregoranders/ts-csv/commit/0e68a0e4da12f3ae86cd1b225b2517325d98f9c8))
+
+##### Chores
+
+* **release:**
+ * update lib version in code ([d1dae662](https://github.com/gregoranders/ts-csv/commit/d1dae6621ab25a93850aaa8ebbaeba1417f107fd))
+ * bump version ([b4f4ae25](https://github.com/gregoranders/ts-csv/commit/b4f4ae256b29fd27ec3e8e60c2f97d0c1607d17a))
+ * remove file ([dfb954df](https://github.com/gregoranders/ts-csv/commit/dfb954df74bb4ef7c84a2795a67d972a2dd17719))
+* **SECURITY:** update ([a0a78fa6](https://github.com/gregoranders/ts-csv/commit/a0a78fa6b4e29519f8c1a25b24afed9d6f9c9c4d))
+* **npm:** remove .npmignore ([9742113e](https://github.com/gregoranders/ts-csv/commit/9742113ecb8136a1d3cbd34360043c915cb2ce05))
+* **package:** remove tasks ([72c5be24](https://github.com/gregoranders/ts-csv/commit/72c5be2458f963b037e54d1a1ffcd6f0a7cdfc31))
+* **eslint:** move config ([9ec51457](https://github.com/gregoranders/ts-csv/commit/9ec51457a62f9eaefd6d889026f57973fef771e3))
+
+##### Documentation Changes
+
+* **CHANGELOG:** update changelog ([1be6a3cb](https://github.com/gregoranders/ts-csv/commit/1be6a3cbbe5d21cf9a297ad01e45d97e6c7be75d))
+* **api:** update api docs ([ef535a35](https://github.com/gregoranders/ts-csv/commit/ef535a3596d3cc21f7bca61fea741d7adcbdf2f6))
+* **README:** update docs ([e08b309d](https://github.com/gregoranders/ts-csv/commit/e08b309d26726a0665a16368d6f903d3a935fce0))
+
+##### Bug Fixes
+
+* **build:** fix code quality issue ([99756f37](https://github.com/gregoranders/ts-csv/commit/99756f37f67d200ca23586c5e767237ab825a143))
+* **tsconfig:** remove DOM ([1773dc79](https://github.com/gregoranders/ts-csv/commit/1773dc798ac9c1f8481514a7f6608b2146753596))
+
+##### Other Changes
+
+* gregoranders/ts-csv into development ([9143c2c3](https://github.com/gregoranders/ts-csv/commit/9143c2c3c9eaf04ff49a725d5e87ed451fef8b9f))
+* bump lint-staged from 10.2.10 to 10.2.11 ([fbd4d5a8](https://github.com/gregoranders/ts-csv/commit/fbd4d5a8e8c7ae044870f47822a73ddc3b6d74b0))
+* bump jest-spec-reporter from 1.0.13 to 1.0.14 ([dba06913](https://github.com/gregoranders/ts-csv/commit/dba06913af3e0f818ef798058e854e10f8a92e90))
+* bump @microsoft/api-documenter from 7.8.12 to 7.8.13 ([9332c321](https://github.com/gregoranders/ts-csv/commit/9332c3211edde18c78ca88e54943f909ada6007e))
+* bump @typescript-eslint/eslint-plugin from 3.2.0 to 3.3.0 ([c1787f9c](https://github.com/gregoranders/ts-csv/commit/c1787f9cb92661d0fe51660cdaa70b71b2d5114e))
+* bump @typescript-eslint/parser from 3.2.0 to 3.3.0 ([56fd575a](https://github.com/gregoranders/ts-csv/commit/56fd575a97b2c295be040990c2ee043ef5136557))
+* bump @microsoft/api-extractor from 7.8.11 to 7.8.12 ([460142f1](https://github.com/gregoranders/ts-csv/commit/460142f161d4e48f6c646f70ac9c504f5e1144d6))
+* bump eslint-plugin-prettier from 3.1.3 to 3.1.4 ([55fbd046](https://github.com/gregoranders/ts-csv/commit/55fbd0460cce18c54f731e0f8a672bc9360041ee))
+
+##### Refactors
+
+* **index:** make result immutable ([ae46c5d8](https://github.com/gregoranders/ts-csv/commit/ae46c5d87b0a7336617f624fdb9f086f7efbeba6))
+* **build:** refactor workflows ([07c95115](https://github.com/gregoranders/ts-csv/commit/07c951150201720b79e7bb6b6ba0e742653fe2b4))
+
#### 0.0.3 (2020-06-14)
##### Documentation Changes
diff --git a/README.md b/README.md
index 7684e3c..f77ff4f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# @gregoranders/csv
-## Simple CSV parser in [TypeScript](http://www.typescriptlang.org/)
+## Simple CSV parser in [TypeScript][typescript-url]
## [API Docs](./docs/index.md)
@@ -12,13 +12,14 @@
[![types][npm-types-image]][npm-types-url]
[![node][node-image]][node-url]
-[![Main Language](https://img.shields.io/github/languages/top/gregoranders/ts-csv)][code-metric-url] [![Languages](https://img.shields.io/github/languages/count/gregoranders/ts-csv)][code-metric-url] [![Code Size](https://img.shields.io/github/languages/code-size/gregoranders/ts-csv)][code-metric-url] [![Repo-Size](https://img.shields.io/github/repo-size/gregoranders/ts-csv)][code-metric-url]
+[![Main Language][language-image]][code-metric-url] [![Languages][languages-image]][code-metric-url] [![Code Size][code-size-image]][code-metric-url] [![Repo-Size][repo-size-image]][code-metric-url]
## Features
-- TypeScript
-- Jest Snapshot/Unit Tests with Code Coverage
-- GitHub CI Integration (feature, development, master)
+- [TypeScript][typescript-url]
+- [Jest][jest-url] Unit Tests with Code Coverage
+- GitHub CI Integration (feature, development, master, release)
+- Publish via CI
- Code Quality via Code Climate
| | | |
@@ -30,16 +31,72 @@
## Example
```sh
-npm install --save-dev @gregoranders/csv
+npm install @gregoranders/csv
```
```ts
import Parser from '@gregoranders/csv';
const parser = new Parser();
-const rows = parser.parse('a,b,c\n1,2,3');
-
-console.log(rows);
+const rows = parser.parse('a,b,c\n1,2,3\n4,5,6');
+```
+```ts
+console.log(JSON.stringify(rows, null, 2));
+
+[
+ [
+ "a",
+ "b",
+ "c"
+ ],
+ [
+ "1",
+ "2",
+ "3"
+ ],
+ [
+ "4",
+ "5",
+ "6"
+ ]
+]
+```
+```ts
+console.log(JSON.stringify(parser.rows, null, 2));
+
+[
+ [
+ "a",
+ "b",
+ "c"
+ ],
+ [
+ "1",
+ "2",
+ "3"
+ ],
+ [
+ "4",
+ "5",
+ "6"
+ ]
+]
+```
+```ts
+console.log(JSON.stringify(parser.json, null, 2));
+
+[
+ {
+ "a": "1",
+ "b": "2",
+ "c": "3"
+ },
+ {
+ "a": "4",
+ "b": "5",
+ "c": "6"
+ }
+]
```
### Clone repository
@@ -62,8 +119,7 @@ npm run build
### Testing
-#### Test using [Jest](https://jestjs.io/)
-
+#### Test using [Jest][jest-url]
```
npm test
```
@@ -122,3 +178,9 @@ npm run clear
[npm-types-image]: https://img.shields.io/npm/types/@gregoranders/csv
[release-url]: https://www.npmjs.com/package/@gregoranders/csv
[release-image]: https://img.shields.io/github/release/gregoranders/ts-csv
+[language-image]: https://img.shields.io/github/languages/top/gregoranders/ts-csv
+[languages-image]: https://img.shields.io/github/languages/count/gregoranders/ts-csv
+[code-size-image]: https://img.shields.io/github/languages/code-size/gregoranders/ts-csv
+[repo-size-image]: https://img.shields.io/github/repo-size/gregoranders/ts-csv
+[typescript-url]: http://www.typescriptlang.org/
+[jest-url]: https://jestjs.io
diff --git a/SECURITY.md b/SECURITY.md
index bdd9c98..e5cc41f 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -5,7 +5,8 @@
| Version | Supported |
| ------- | ------------------ |
-| 0.0.3 | :white_check_mark: |
+| 0.0.4 | :white_check_mark: |
+| 0.0.3 | :x: |
| 0.0.2 | :x: |
| 0.0.1 | :x: |
diff --git a/docs/csv.libversion.md b/docs/csv.libversion.md
index 6d3da00..4bccf8c 100644
--- a/docs/csv.libversion.md
+++ b/docs/csv.libversion.md
@@ -9,5 +9,5 @@ library version
Signature:
```typescript
-libversion = "0.0.3"
+libversion = "0.0.4"
```
diff --git a/docs/csv.parser.json.md b/docs/csv.parser.json.md
index 5bcc0a5..8f566aa 100644
--- a/docs/csv.parser.json.md
+++ b/docs/csv.parser.json.md
@@ -9,5 +9,6 @@ returns rows as JSON using the first row as property name provider
Signature:
```typescript
+/** @virtual */
get json(): readonly T[];
```
diff --git a/docs/csv.parser.md b/docs/csv.parser.md
index 785e151..e70f3ea 100644
--- a/docs/csv.parser.md
+++ b/docs/csv.parser.md
@@ -19,9 +19,7 @@ export declare class Parser>
import Parser from '@gregoranders/csv';
const parser = new Parser();
-const rows = parser.parse('a,b,c\n1,2,3');
-
-console.log(rows);
+const rows = parser.parse('a,b,c\n1,2,3\n4,5,6');
```
diff --git a/docs/csv.parser.rows.md b/docs/csv.parser.rows.md
index 04755ed..a450eb7 100644
--- a/docs/csv.parser.rows.md
+++ b/docs/csv.parser.rows.md
@@ -9,5 +9,6 @@ returns rows
Signature:
```typescript
+/** @virtual */
get rows(): readonly Row[];
```
diff --git a/etc/csv.api.md b/etc/csv.api.md
index eb4638f..f54971c 100644
--- a/etc/csv.api.md
+++ b/etc/csv.api.md
@@ -21,13 +21,15 @@ export const libname = "@gregoranders/csv";
export const liburl = "https://gregoranders.github.io/ts-csv/";
// @public
-export const libversion = "0.0.3";
+export const libversion = "0.0.4";
// @public
class Parser> {
constructor(configuration?: Configuration);
+ // @virtual
get json(): readonly T[];
parse(text: string): readonly Row[];
+ // @virtual
get rows(): readonly Row[];
}
diff --git a/package.json b/package.json
index 1eb725c..97575f9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@gregoranders/csv",
- "version": "0.0.3",
+ "version": "0.0.4",
"description": "Simple CSV parser in TypeScript",
"scripts": {
"clear": "npm run prescript && npm run pretest && rimraf ./node_modules ./package-lock.json ./temp",
@@ -12,13 +12,10 @@
"script": "npm run script:cjs && npm run script:esm",
"script:cjs": "tsc --project ./ --module commonjs --target es5 --outDir ./dist/cjs",
"script:esm": "tsc --project ./ --module es6 --declaration --declarationDir ./dist/esm --outDir ./dist/esm",
- "prepare": "npm test && npm run build && npm run api-extractor && npm run api-documenter && eslint --ext .ts ./src",
+ "prepare": "npm test && npm run build && npm run api-extractor && npm run api-documenter && eslint --ext .ts ./src && rimraf ./build/esm/index.d.ts",
"api-extractor": "api-extractor run --local --verbose",
"api-documenter": "api-documenter markdown --input ./dist --output ./docs-tmp && cpx 'docs-tmp/**/*.*' docs",
- "codeclimate": "docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze",
- "release:major": "changelog -M && git add CHANGELOG.md && git commit -m 'chore(changelog): CHANGELOG.md' && npm version major -m \"chore(release): %s \"",
- "release:minor": "changelog -m && git add CHANGELOG.md && git commit -m 'chore(changelog): CHANGELOG.md' && npm version minor -m \"chore(release): %s \"",
- "release:patch": "changelog -p && git add CHANGELOG.md && git commit -m 'chore(changelog): CHANGELOG.md' && npm version patch -m \"chore(release): %s \""
+ "codeclimate": "docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze"
},
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
@@ -41,6 +38,24 @@
"jest",
"typescript"
],
+ "eslintConfig": {
+ "root": true,
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"],
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "prettier/@typescript-eslint"
+ ],
+ "parserOptions": {
+ "ecmaVersion": 2020,
+ "sourceType": "module",
+ "ecmaFeatures": {
+ }
+ },
+ "rules": {},
+ "settings": {}
+ },
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm run prepare",
@@ -115,17 +130,17 @@
},
"homepage": "https://gregoranders.github.io/ts-csv/",
"devDependencies": {
- "@microsoft/api-documenter": "7.8.12",
- "@microsoft/api-extractor": "7.8.11",
+ "@microsoft/api-documenter": "7.8.13",
+ "@microsoft/api-extractor": "7.8.12",
"@types/jest": "26.0.0",
"@types/node": "14.0.13",
- "@typescript-eslint/eslint-plugin": "3.2.0",
- "@typescript-eslint/parser": "3.2.0",
+ "@typescript-eslint/eslint-plugin": "3.3.0",
+ "@typescript-eslint/parser": "3.3.0",
"cpx": "1.5.0",
"cross-env": "7.0.2",
"eslint": "7.2.0",
"eslint-config-prettier": "6.11.0",
- "eslint-plugin-prettier": "3.1.3",
+ "eslint-plugin-prettier": "3.1.4",
"eslint-plugin-react": "7.20.0",
"eslint-plugin-react-hooks": "4.0.4",
"generate-changelog": "1.8.0",
@@ -134,8 +149,8 @@
"jest-cli": "26.0.1",
"jest-html-reporter": "3.1.3",
"jest-junit": "10.0.0",
- "jest-spec-reporter": "1.0.13",
- "lint-staged": "10.2.10",
+ "jest-spec-reporter": "1.0.14",
+ "lint-staged": "10.2.11",
"prettier": "2.0.5",
"rimraf": "3.0.2",
"ts-jest": "26.1.0",
diff --git a/src/index.spec.ts b/src/index.spec.ts
index cd72ada..d1255be 100644
--- a/src/index.spec.ts
+++ b/src/index.spec.ts
@@ -17,7 +17,7 @@ describe(`${TestSubject.libname} ${TestSubject.libversion} - csv`, () => {
});
it('libversion', () => {
- expect(TestSubject.libversion).toBe('0.0.3');
+ expect(TestSubject.libversion).toBe('0.0.4');
});
it('liburl', () => {
@@ -195,4 +195,84 @@ describe(`${TestSubject.libname} ${TestSubject.libversion} - csv`, () => {
});
});
});
+
+ describe(`returned value is immutable`, () => {
+ it('parse should return immutable value', () => {
+ const testSubject = new TestSubject.Parser();
+ const rows = testSubject.parse('1,2,3\n,b,c');
+
+ const wrows = (rows as unknown) as Array;
+ expect.assertions(3)
+
+ try {
+ wrows.push(['test']);
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError('Cannot add property 2, object is not extensible'));
+ }
+
+ try {
+ wrows[0].push('test');
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError('Cannot add property 3, object is not extensible'));
+ }
+
+ try {
+ wrows[0][0] = 'test';
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError(`Cannot assign to read only property '0' of object '[object Array]'`));
+ }
+ });
+
+ it('rows should return immutable value', () => {
+ const testSubject = new TestSubject.Parser();
+ testSubject.parse('1,2,3\n,b,c');
+
+ const wrows = (testSubject.rows as unknown) as Array;
+ expect.assertions(3)
+
+ try {
+ wrows.push(['test']);
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError('Cannot add property 2, object is not extensible'));
+ }
+
+ try {
+ wrows[0].push('test');
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError('Cannot add property 3, object is not extensible'));
+ }
+
+ try {
+ wrows[0][0] = 'test';
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError(`Cannot assign to read only property '0' of object '[object Array]'`));
+ }
+ });
+
+ it('json should return immutable value', () => {
+ const testSubject = new TestSubject.Parser();
+ testSubject.parse('1,2,3\n,b,c');
+
+ const wrows = (testSubject.json as unknown) as Array>;
+ expect.assertions(3)
+
+ try {
+ wrows.push({'test': 'test'});
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError('Cannot add property 1, object is not extensible'));
+ }
+
+ try {
+ wrows.push({'test': 'test'});
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError('Cannot add property 1, object is not extensible'));
+ }
+
+ try {
+ wrows[0]['1'] = 'test';
+ } catch (error) {
+ expect(error).toStrictEqual(TypeError(`Cannot assign to read only property '1' of object '#