Comments (4)
Yes, sadly I broke the cardinal sin of using git! I left the new code on my machine and then my Mac went to the apple store and they formatted my machine despite me telling them not to!
Help is definitely welcome! The biggest drag I had during development was writing tests to catch all the conditions we’d hit.
I’ll come back to this issue in a bit with an action plan on what to do next.
from loupe.
Yes, sadly I broke the cardinal sin of using git! I left the new code on my machine
Haven't we all 😉 but ...
... and my Mac went to the apple store and they formatted my machine despite me telling them not to!
That's a real bummer 😿
Help is definitely welcome! The biggest drag I had during development was writing tests to catch all the conditions we’d hit.
Tests sounds like fun, and that's something I can definitely contribute once I've seen an example. I guess we could make it super easy using some sort of factory/helper? I can happily write one of those we the time comes. (I have been writing custom assertions for a private project and it's been a real treat to make my tests look ✨ nice ✨)
I’ll come back to this issue in a bit with an action plan on what to do next.
Good, I'm looking forward to it. In the other issue I linked to node's current inspect implementation, I think a fair amount can be borrowed from there. To cut down on the work, right?
from loupe.
Hey @maxnordlund! Happy new year!
Over the Christmas holidays I managed to source a slightly outdated backup of loupe@2 code, and get it in working order so we have something that closely resembles what I had before. It lives in the v2
branch and is also over on #14.
Right now test coverage isn't perfect so if you have time to contribute tests that would be 🎉 amazing.
We really need some good acceptance tests to cover some edge cases, to make sure the code is working as it should do. I've written 2 tests to get you started:
Lines 3 to 11 in e11b077
So to write more it's a case of calling inspect()
with some object, and wrapping that in a chai expect test, so the whole thing is:
expect(inspect({})).to.equal('{}')
Coming up with some examples is the harder part - finding some objects in your existing code bases or trying to come up with esoteric examples that will break the code would be awesome!
Happy testing!
from loupe.
Closing this in favour of #15
from loupe.
Related Issues (20)
- TODO for v2 Release HOT 4
- Time representation difference in Chai.js HOT 6
- Loupe doesn't work correctly for buffers HOT 2
- Return value for number 0 HOT 6
- `inspect( 1n )` => no joy HOT 2
- broken dependency `get-function-name` HOT 2
- Handle circular references HOT 1
- Quote complex keys in objects HOT 1
- The automated release is failing 🚨 HOT 1
- IE9+ not supported since 4.3.5 because of loupe HOT 4
- inspect of Object with null prototype causes primitive value error
- Invalid Date object will throw a TypeError HOT 5
- add an option to render functions as their body HOT 5
- Package `loupe` seems to be an ES Module but shipped in a CommonJS package HOT 1
- `depth` option HOT 1
- vulnerability in loupe HOT 1
- New release for Dependabot Fix? HOT 1
- prevent `playwright` installation HOT 2
- Is the custom `inspect()` still needed?
- Handle circular references better HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loupe.