Skip to content

Fix merge conflict #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
56d59ef
Set up Jest testing framework
jahn96 Nov 5, 2020
85f9de9
Start unit testing
jahn96 Nov 12, 2020
efa4c66
Remove unnecessary setup
jahn96 Nov 12, 2020
901a2a9
Unit test for CodeSnippetWidgetModel class
jahn96 Nov 12, 2020
df589c5
Start unit testing code snippet contents service
jahn96 Nov 12, 2020
0cce8ba
Fix errors and add test cases
jahn96 Nov 14, 2020
b0e5f62
Finished testing codeSnippetContentsService
jahn96 Nov 17, 2020
797a739
Finished testing codeSnippetWidgetModel
jahn96 Nov 17, 2020
efc93af
Delete jupyterlab/testutil as its dependency
jahn96 Nov 17, 2020
49cce64
Start testing React Componenets
jahn96 Nov 21, 2020
ca358c5
Add test coverage
jahn96 Nov 21, 2020
bcc30ca
Fix mislabeled file extension
jahn96 Nov 21, 2020
66fd450
testing codeSnippetEditor
jahn96 Jan 12, 2021
7d97b38
Set up Jest testing framework
jahn96 Nov 5, 2020
1189d2b
Start unit testing
jahn96 Nov 12, 2020
4866282
Remove unnecessary setup
jahn96 Nov 12, 2020
8c329b6
Fix errors and add test cases
jahn96 Nov 14, 2020
8a3b40d
Delete jupyterlab/testutil as its dependency
jahn96 Nov 17, 2020
8eb8277
Start testing React Componenets
jahn96 Nov 21, 2020
cfc5857
testing codeSnippetEditor
jahn96 Jan 12, 2021
1515dfb
Merge branch 'jest_testing' of https://github.com/jahn96/project2 int…
jahn96 Jan 27, 2021
628ba9b
Fix build
jahn96 Jan 28, 2021
642d791
Upload yarn.lock
jahn96 Jan 28, 2021
217b212
Merge branch 'jahn96-jest_testing'
jahn96 Jan 28, 2021
fd575d9
Merge branch 'master' of https://github.com/jupytercalpoly/project2
jahn96 Jan 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ dist
coverage
**/*.d.ts
test
_temp_extension
_temp_extension
babel.config.ts
jest.config.ts
28 changes: 25 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
"prepare": "jlpm run clean && jlpm run build:prod",
"watch": "run-p watch:src watch:labextension",
"watch:labextension": "jupyter labextension watch .",
"watch:src": "tsc -w"
"watch:src": "tsc -w",
"test": "jest --watch",
"test:cov": "jest --collect-coverage"
},
"dependencies": {
"@jupyterlab/application": "^3.0.3",
Expand All @@ -64,13 +66,28 @@
"@lumino/dragdrop": "^1.7.1",
"@lumino/messaging": "^1.4.3",
"@lumino/properties": "^1.2.3",
"@lumino/signaling": "^1.4.3"
"@lumino/signaling": "^1.4.3",
"@lumino/widgets": "^1.13.2"
},
"devDependencies": {
"@jupyterlab/builder": "^3.0.0-rc.13",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"eslint": "^7.5.0",
"@babel/core": "^7",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.5",
"@testing-library/react": "^11.1.1",
"@types/enzyme": "^3.10.8",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/jest": "^26.0.15",
"@types/node-fetch": "^2.5.7",
"@types/react": "^16.9.56",
"@types/react-dom": "^16.9.9",
"@types/react-test-renderer": "^16.9.3",
"babel-jest": "^26.6.3",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.20.4",
Expand All @@ -82,7 +99,12 @@
"npm-run-all": "^4.1.5",
"prettier": "^1.19.0",
"rimraf": "^3.0.2",
"typescript": "~4.1.3"
"typescript": "~4.1.3",
"react-test-renderer": "^17.0.1",
"ts-jest": "^26.4.4"
},
"resolutions": {
"@types/react": "^16.9.56"
},
"sideEffects": [
"style/*.css",
Expand Down
29 changes: 29 additions & 0 deletions test/codeSnippetEditor.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// start testing code snippet editor
// need to include functions

import React from 'react';
import renderer from 'react-test-renderer';
import { shallow } from 'enzyme';

import { CodeSnippetEditor } from '../src/CodeSnippetEditor';
// import { CodeSnippetDisplay } from '../src/CodeSnippetDisplay';
import { CodeSnippetEditorTags } from '../src/CodeSnippetEditorTags';
// import { Link } from '../src/Link';


interface ICodeSnippetEditorTagProps {
selectedTags: string[];
tags: string[];
handleChange: (selectedTags: string[], allTags: string[]) => void;
};

interface ICodeSnippetEditorTagState {
selectedTags: string[];
tags: string[];
plusIconShouldHide: boolean;
addingNewTag: boolean;
};

describe('jupyterlab/codeSnippetEditor', () => {

})
4 changes: 2 additions & 2 deletions tsconfig.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"es2015.iterable",
"es2017.object"
],
"types": ["jest"],
"types": ["jest", "node"],
"typeRoots": ["./types", "./node_modules/@types"],
"jsx": "react",
"resolveJsonModule": true,
Expand All @@ -24,4 +24,4 @@
"skipLibCheck": true
},
"include": ["src/**/*", "test/**/*"]
}
}
Loading