GithubHelp home page GithubHelp logo

Comments (11)

 avatar commented on May 21, 2024 1

I would be interested it looking into what automated testing could be applied.

from spaceship-prompt.

salmanulfarzy avatar salmanulfarzy commented on May 21, 2024

shunit2 seems to be a good option. bhilburn/powerlevel9k theme has a test suit with shunit2. There is also a discussion about testing themes in here by @denysdovhan

Huge change to theme is being developed with #78 . So, It might be better to hold off testing until it's merged.

from spaceship-prompt.

denysdovhan avatar denysdovhan commented on May 21, 2024

I'm not sure about unit testing library. Don't know how to implement tests properly. Actually, I was wondering about creating unified code base in one of high level scripting languages, like Python or JavaScript. Beside single code base there should be a loaders (adapters) for different shells. On my opinion, with that approach we can achieve few important benefits:

  • single code base
  • additional support of other shells
  • better language (to be honest, zsh is not an example of good language)
  • tests
  • async operation -> performance

That's just an idea, but here is my attempt with default Oh-My-Zsh theme — robbyrussell. What do you think?

from spaceship-prompt.

jwkicklighter avatar jwkicklighter commented on May 21, 2024

@denysdovhan what is the speed like with the rewritten JS version of robbyrussel?

from spaceship-prompt.

denysdovhan avatar denysdovhan commented on May 21, 2024

@jwkicklighter we didn't achieve significant performance speed up.

from spaceship-prompt.

denysdovhan avatar denysdovhan commented on May 21, 2024

@salmanulfarzy @maximbaz I'd like to pay your attention to this issue since it should have top priority for us. Spaceship has a lot of sections and it's easy to break something without noticing. We should finally find the way to test Spaceship at least for basic functionality.

from spaceship-prompt.

jwkicklighter avatar jwkicklighter commented on May 21, 2024

@denysdovhan I was more concerned with it being less performant, which I guess it isn't based on your comment

from spaceship-prompt.

salmanulfarzy avatar salmanulfarzy commented on May 21, 2024

I've no idea where to begin from and what to test. There isn't much to take reference from prompts that are tested. But following the powerlevel9K path, Made a single passing test about char section and confused about how to proceed. If this the right approach, I can make a WIP pull request that we can further work.

ZUnit looks promising with powerful assertion library for Zsh specific testing. I haven't worked on this yet.

from spaceship-prompt.

denysdovhan avatar denysdovhan commented on May 21, 2024

@salmanulfarzy your example of tests for chat section LGTM. I would prefer to use shunit since it's more trusted and battle-tested. Can you give any advantages of using Zunit?

from spaceship-prompt.

matchai avatar matchai commented on May 21, 2024

I'm actively working on writing tests for all sections that have been ported from spaceship to spacefish so far.
If it would help get this PR started, I encourage you to port over our tests, which should cover the same functional use cases: https://github.com/matchai/spacefish/tree/master/tests

from spaceship-prompt.

denysdovhan avatar denysdovhan commented on May 21, 2024

Follow #458 for updates.

from spaceship-prompt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.