Skip to content

Commit 4d7c101

Browse files
shrirambalajiCompuIves
authored andcommitted
Do nullcheck on Jest file.tests in DevTools (codesandbox#2617)
* Do nullcheck on file.tests in DevTools * Add @Shriram-Balaji as a contributor
1 parent c549a8a commit 4d7c101

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

β€Ž.all-contributorsrcβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,15 @@
13471347
"contributions": [
13481348
"code"
13491349
]
1350+
},
1351+
{
1352+
"login": "Shriram-Balaji",
1353+
"name": "Shriram Balaji",
1354+
"avatar_url": "https://avatars1.githubusercontent.com/u/11358903?v=4",
1355+
"profile": "https://shriram-balaji.github.io",
1356+
"contributions": [
1357+
"code"
1358+
]
13501359
}
13511360
],
13521361
"repoType": "github",

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-143-orange.svg?style=flat-square)](#contributors) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
1+
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-144-orange.svg?style=flat-square)](#contributors) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
22

33
[![Backers on Open Collective](https://opencollective.com/codesandbox/backers/badge.svg)](#backers)
44
[![Sponsors on Open Collective](https://opencollective.com/codesandbox/sponsors/badge.svg)](#sponsors)
@@ -63,7 +63,7 @@ Thanks goes to these wonderful people
6363
| [<img src="https://avatars2.githubusercontent.com/u/8527474?v=4" width="100px;"/><br /><sub><b>Neville Mehta</b></sub>](https://twitter.com/ask_neville)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=nm123github "Code") | [<img src="https://avatars0.githubusercontent.com/u/1813468?v=4" width="100px;"/><br /><sub><b>Vasiliy</b></sub>](https://github.com/Yeti-or)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Yeti-or "Code") | [<img src="https://avatars3.githubusercontent.com/u/2793951?v=4" width="100px;"/><br /><sub><b>Romain Lanz</b></sub>](https://slynova.io)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=RomainLanz "Code") | [<img src="https://avatars2.githubusercontent.com/u/1233790?v=4" width="100px;"/><br /><sub><b>LiBe</b></sub>](http://libe.toile-libre.org)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=libetl "Code") | [<img src="https://avatars0.githubusercontent.com/u/5333019?v=4" width="100px;"/><br /><sub><b>Jeremy Bolding</b></sub>](http://thecodechef.github.io)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=thecodechef "Code") | [<img src="https://avatars1.githubusercontent.com/u/9664363?v=4" width="100px;"/><br /><sub><b>Evan Bacon</b></sub>](https://twitter.com/baconbrix)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=EvanBacon "Code") | [<img src="https://avatars3.githubusercontent.com/u/6643991?v=4" width="100px;"/><br /><sub><b>MichaΓ«l De Boey</b></sub>](https://michaeldeboey.be)<br />[πŸ“](#blog-MichaelDeBoey "Blogposts") [πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AMichaelDeBoey "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=MichaelDeBoey "Code") [πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=MichaelDeBoey "Documentation") [πŸš‡](#infra-MichaelDeBoey "Infrastructure (Hosting, Build-Tools, etc)") [πŸ”§](#tool-MichaelDeBoey "Tools") |
6464
| [<img src="https://avatars1.githubusercontent.com/u/14077091?v=4" width="100px;"/><br /><sub><b>gabeeden</b></sub>](https://github.com/gabeeden)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=gabeeden "Code") | [<img src="https://avatars0.githubusercontent.com/u/7698292?v=4" width="100px;"/><br /><sub><b>Tiffany White</b></sub>](https://tiffanywhite.dev)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=twhite96 "Code") | [<img src="https://avatars3.githubusercontent.com/u/32302360?v=4" width="100px;"/><br /><sub><b>James Bedford</b></sub>](http://www.dopest.tech)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=JABedford "Code") | [<img src="https://avatars0.githubusercontent.com/u/3314957?v=4" width="100px;"/><br /><sub><b>Scott</b></sub>](https://www.patreon.com/user?u=16255660)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=smolinari "Code") | [<img src="https://avatars1.githubusercontent.com/u/12200583?v=4" width="100px;"/><br /><sub><b>Dutiyesh Salunkhe</b></sub>](https://github.com/dutiyesh)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=dutiyesh "Code") | [<img src="https://avatars2.githubusercontent.com/u/13641726?v=4" width="100px;"/><br /><sub><b>Halit Ogunc</b></sub>](http://halit.dev)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=halitogunc "Code") | [<img src="https://avatars0.githubusercontent.com/u/22376783?v=4" width="100px;"/><br /><sub><b>Yash Joshi</b></sub>](https://github.com/jyash97)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=jyash97 "Code") |
6565
| [<img src="https://avatars3.githubusercontent.com/u/1769092?v=4" width="100px;"/><br /><sub><b>Yehor</b></sub>](https://github.com/batiskafff)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=batiskafff "Code") | [<img src="https://avatars2.githubusercontent.com/u/6972822?v=4" width="100px;"/><br /><sub><b>Jens de Rond</b></sub>](https://github.com/Jensderond)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AJensderond "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Jensderond "Code") | [<img src="https://avatars2.githubusercontent.com/u/2502947?v=4" width="100px;"/><br /><sub><b>Benjamin Schachter</b></sub>](http://benjaminschachter.com)<br />[πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=benschac "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/14234815?v=4" width="100px;"/><br /><sub><b>Rafael</b></sub>](https://github.com/RafaelKr)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3ARafaelKr "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=RafaelKr "Code") | [<img src="https://avatars0.githubusercontent.com/u/19686979?v=4" width="100px;"/><br /><sub><b>baremetalfreak</b></sub>](https://github.com/baremetalfreak)<br />[πŸ’¬](#question-baremetalfreak "Answering Questions") [πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3Abaremetalfreak "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=baremetalfreak "Code") | [<img src="https://avatars0.githubusercontent.com/u/13278577?v=4" width="100px;"/><br /><sub><b>Javed</b></sub>](https://github.com/JayBee007)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=JayBee007 "Code") | [<img src="https://avatars1.githubusercontent.com/u/29365693?v=4" width="100px;"/><br /><sub><b>R4M80MRX</b></sub>](https://github.com/R4M80MrX)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=R4M80MrX "Code") |
66-
| [<img src="https://avatars2.githubusercontent.com/u/53202242?v=4" width="100px;"/><br /><sub><b>Dr. Derek Austin [aka dj D-REK from Richmond, VA]</b></sub>](https://medium.com/@derek_develops)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AdjD-REK "Bug reports") | [<img src="https://avatars0.githubusercontent.com/u/1863771?v=4" width="100px;"/><br /><sub><b>Sid</b></sub>](https://sid.st)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=siddharthkp "Code") | [<img src="https://avatars0.githubusercontent.com/u/9127504?v=4" width="100px;"/><br /><sub><b>Yeison Daza</b></sub>](http://yeisondaza.com)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=yeion7 "Code") |
66+
| [<img src="https://avatars2.githubusercontent.com/u/53202242?v=4" width="100px;"/><br /><sub><b>Dr. Derek Austin [aka dj D-REK from Richmond, VA]</b></sub>](https://medium.com/@derek_develops)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AdjD-REK "Bug reports") | [<img src="https://avatars0.githubusercontent.com/u/1863771?v=4" width="100px;"/><br /><sub><b>Sid</b></sub>](https://sid.st)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=siddharthkp "Code") | [<img src="https://avatars0.githubusercontent.com/u/9127504?v=4" width="100px;"/><br /><sub><b>Yeison Daza</b></sub>](http://yeisondaza.com)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=yeion7 "Code") | [<img src="https://avatars1.githubusercontent.com/u/11358903?v=4" width="100px;"/><br /><sub><b>Shriram Balaji</b></sub>](https://shriram-balaji.github.io)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Shriram-Balaji "Code") |
6767
<!-- ALL-CONTRIBUTORS-LIST:END -->
6868

6969
## Backers

β€Žpackages/app/src/app/components/Preview/DevTools/Tests/index.tsxβ€Ž

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,9 +517,11 @@ class Tests extends React.Component<DevToolProps, State> {
517517
const tests = [];
518518
Object.keys(this.state.files).forEach(path => {
519519
const file = this.state.files[path];
520-
Object.keys(file.tests).forEach(t => {
521-
tests.push(file.tests[t]);
522-
});
520+
if (file && file.tests) {
521+
Object.keys(file.tests).forEach(t => {
522+
tests.push(file.tests[t]);
523+
});
524+
}
523525
});
524526

525527
// Types for split-pane don't work because they're in root.

0 commit comments

Comments
Β (0)