AG-2656 Allow equality checking for rowData to be configurable (ie use equality checking, deep checking and so on)
This commit is contained in:
12
package.json
12
package.json
@@ -17,7 +17,8 @@
|
||||
"build-dashboard": "webpack --config config/webpack.config.trader.js --progress --profile --bail",
|
||||
"build-all": "npm run build-examples && npm run build-dashboard",
|
||||
"build": "npm run clean && npm run mkdirs && npm run build-all && npm run copy",
|
||||
"start": "npm run examples"
|
||||
"start": "npm run examples",
|
||||
"test" : "sh ./ts-tests/runTsTests.sh"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -38,11 +39,13 @@
|
||||
"homepage": "http://www.ag-grid.com/",
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.3.3",
|
||||
"babel-loader": "8.0.5",
|
||||
"@babel/preset-env": "7.3.1",
|
||||
"@babel/preset-react": "7.0.0",
|
||||
"@babel/plugin-proposal-class-properties": "7.3.3",
|
||||
"@babel/plugin-proposal-function-bind": "7.2.0",
|
||||
"@babel/preset-env": "7.3.1",
|
||||
"@babel/preset-react": "7.0.0",
|
||||
"@types/react": "^16.8.6",
|
||||
"@types/react-dom": "^16.8.2",
|
||||
"babel-loader": "8.0.5",
|
||||
"css-loader": "2.1.0",
|
||||
"file-loader": "3.0.1",
|
||||
"gulp": "3.9.1",
|
||||
@@ -52,6 +55,7 @@
|
||||
"prop-types": "15.7.2",
|
||||
"rimraf": "2.6.3",
|
||||
"style-loader": "0.23.1",
|
||||
"typescript": "^3.3.3333",
|
||||
"webpack": "4.29.5",
|
||||
"webpack-cli": "3.2.3",
|
||||
"webpack-dev-server": "3.2.0"
|
||||
|
||||
4
ts-tests/InvalidGridProperty.tsx
Normal file
4
ts-tests/InvalidGridProperty.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
import React from 'react';
|
||||
import {AgGridReact} from 'ag-grid-react';
|
||||
|
||||
export const App: React.FunctionComponent = () => <AgGridReact invalidProperty columnDefs={[]} rowData={[]}/>;
|
||||
4
ts-tests/SimpleFunctionalGrid.tsx
Normal file
4
ts-tests/SimpleFunctionalGrid.tsx
Normal file
@@ -0,0 +1,4 @@
|
||||
import React from 'react';
|
||||
import {AgGridReact} from 'ag-grid-react';
|
||||
|
||||
export const App: React.FunctionComponent = () => <AgGridReact columnDefs={[]} rowData={[]}/>;
|
||||
26
ts-tests/runTsTests.sh
Executable file
26
ts-tests/runTsTests.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# here as a quick ts test for use in the CI
|
||||
# in time this will be removed the full battery of tests be moved to a centralised location
|
||||
|
||||
error_found=false
|
||||
|
||||
# has an invalid property - should complain
|
||||
./node_modules/.bin/tsc --target "ES5" --module 'commonjs' --lib esnext,dom --allowSyntheticDefaultImports --jsx 'preserve' --noEmit --strict ts-tests/InvalidGridProperty.tsx &> /dev/null
|
||||
if [ $? -ne 1 ]; then
|
||||
echo "ag-grid-react grid with invalid property should throw a compiler error"
|
||||
error_found=true
|
||||
fi
|
||||
|
||||
# a valid grid - no errors should be emitted
|
||||
./node_modules/.bin/tsc --target "ES5" --module 'commonjs' --lib esnext,dom --allowSyntheticDefaultImports --jsx 'preserve' --noEmit --strict ts-tests/SimpleFunctionalGrid.tsx &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "valid ag-grid-react grid should compile"
|
||||
error_found=true
|
||||
fi
|
||||
|
||||
if [ "$error_found" = true ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user