Skip to content

Commit a2bc8ec

Browse files
committed
54
1 parent e0ad021 commit a2bc8ec

File tree

2 files changed

+56
-18
lines changed

2 files changed

+56
-18
lines changed

src/app/__tests__zo/ZoTest.test.tsx

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,60 @@ import MainContainer from '../containers/MainContainer';
77
import App from '../components/App';
88
import SwitchAppDropdown from '../components/SwitchApp';
99

10-
test('Main Container should render', () => {
11-
render(<MainContainer />);
12-
screen.debug();
10+
// notes: beforeAll? can render in here before then testing
11+
// after render, can check if the element that has been rendered has props of testing data.
12+
// issues with inrtinsic values, possibly typescript issue
13+
// basically it seems like switchappdropdown is expecting a specific type
14+
// but the component itself doesnt seem like it's in ts?
15+
16+
// Instrinsic Attributes type is a built in TS type that represents defualt attributes like id, className, style
17+
// so maybe switchappdropdown needs be assigned a type instead of auto assigned intrinsic?
18+
19+
describe('Tests for components', () => {
20+
describe('Testing Switchapp', () => {
21+
let dropdown;
22+
const props = {
23+
currTab: {
24+
label: 'Testing',
25+
value: 12353,
26+
},
27+
styles: {},
28+
options: [],
29+
};
30+
test('Testing', () => {
31+
render(<SwitchAppDropdown value= />);
32+
});
33+
});
1334
});
14-
// test('App should render', () => {
15-
// render(<App />);
16-
// screen.debug();
17-
// });
18-
// test('Switchapp should render', () => {
19-
// render(<SwitchAppDropdown />);
20-
// screen.debug();
21-
// });
2235

23-
// test('Test should run, header renders and it has correct stuff', () => {
24-
// render(<Header />);
25-
// // Extract header
26-
// screen.debug();
27-
// // allows the DOM to be rendered
28-
// });
36+
// return (
37+
// <Select
38+
// className='tab-select-container'
39+
// classNamePrefix='tab-select'
40+
// value={currTab}
41+
// styles={customStyles}
42+
// onChange={(e) => {
43+
// dispatch(setTab(parseInt(e.value, 10)));
44+
// }}
45+
// options={tabsArray}
46+
// />
47+
// );
48+
// describe('LabeledText', () => {
49+
// let text;
50+
// const props = {
51+
// label: 'Mega',
52+
// text: 'Markets',
53+
// };
54+
55+
// beforeAll(() => {
56+
// text = render(<LabeledText {...props} />)
57+
58+
// });
59+
60+
// test('Renders the passed-in text with the label in bold', () => {
61+
// expect(text.getByText("Mega:").nextSibling).toHaveTextContent('Markets');
62+
// expect(text.getByText('Mega:')).toHaveStyle('font-weight: bold')
63+
// });
64+
// console.log('currTab', currTab);
65+
// console.log('customStyles', customStyles);
66+
// console.log('tabsArray', tabsArray);

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
// ---------------------------------TYPE CHECKING---------------------------
2222
// "strict": true, /* Enable all strict type-checking options. */
23-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
23+
// "noImplicitAny": true /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
2424
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
2525
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
2626
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */

0 commit comments

Comments
 (0)