DEV Community

Roxanne Lee
Roxanne Lee

Posted on

Release 3.0 Pre

The last two weeks for the last release, everyone's busy with other assignments and finals, and including me as well. When I envisioned 3.0 I had thought that we'd have something stable and it'd be more about putting in tests, smoothing out docs and maybe dealing with a few critical bug fixes. But, its seems that we're still trying to cram a lot of major stuff in this release. Changes that make it seem like I have to know Telescope again, as if I've never worked on it this semester. But, maybe more on this later.


Indexer tests

The last set of issues for me adding in autocomplete indexing is to add unit tests for our Indexer. The tests might not seem like much, but ElasticSearch-mock was at it again, playing around with me for "old times sake". As I had probably mentioned blogs ago, ES-mock is rather strict with its mocking. If it doesn't like the request that it's detected, it'll complain.

When for indexing it was trying to translate console commands to javascript, for mocking it was the other way around. Sometimes the ElasticSearch documentation aren't really that helpful either. Like the create api, for example, there's four possible requests.

Anyways, I eventually found a way to deal with the horrifying mock-not-found error. For any future playmates of ES-mock that happen to stumble upon this blog, if you ever get that error, just console log error.meta.meta.request, and you'll see the correct request path that its trying to call.

It was also neat I got to play with spying on logger for these tests. Just remember to also jest.clearAllMocks(); after each unit test, or the log spies will interfere with one another.


Search service README

A smaller documentation PR I did was to update the Search readme. Technically its partially my fault for not having kept it up to date when I made all those changes in Search.

I had initially wanted to do a bit more for this Search README, and maybe set the service up with a dev script and document in the README how it can be used. Kind of like how I had written it in a previous blog. In order to make it useful I'd have to know which docker images needed to be run for Search to fully function (with results). But, as I had mentioned above, quite a bit of new stuff has been merged into this last release, that I am not even sure anymore. So, maybe when things are more stable and clear, I can get back to it.


On a side note, a rather cool PR that I reviewed was on a CloudFormation template. I think it might be nice for future students who also work on potatoes for Telescope. Just please do remember to delete the stack when done working.


Conclusion

I have a final during the time when the release is scheduled to happen. So, all I can say now is, fingers crossed, I hope everything goes smoothly.

Top comments (0)