eliza icon indicating copy to clipboard operation
eliza copied to clipboard

Core Unit Tests

Open ponderingdemocritus opened this issue 1 year ago • 6 comments

This task is to implement unit tests for all the core functions.

Use Vitest as the test suite.

ponderingdemocritus avatar Nov 15 '24 23:11 ponderingdemocritus

@ponderingdemocritus Are the existing tests passing now or is this task for new tests? I've tried running tests on main and not able to get them all to pass. Also, do you know if there are tests running in CI now? I haven't found anywhere we're doing this yet.

normand1 avatar Nov 16 '24 00:11 normand1

Last I checked the tests are not passing

odilitime avatar Nov 16 '24 00:11 odilitime

Also,

Use Vitest as the test suite.

I don't see Vitest as a current Core dependency. Looks like all tests are written in Jest. Is there another task to implement Vitest?

normand1 avatar Nov 16 '24 00:11 normand1

there are no real Unit tests in the repo. The current e2e tests are broken and need overhauling.

First step however is to implement unit tests.

If you want to tackle this:

  • install vite
  • implement a unit test for one of the files in the core (eg actions)

ponderingdemocritus avatar Nov 16 '24 01:11 ponderingdemocritus

@ponderingdemocritus There were actually a lot of tests and test resources that appear to only have been added a couple of weeks ago and they were all just deleted by this PR: https://github.com/ai16z/eliza/pull/287/files#diff-c692db8dc3c120023e07a56db7bd030a714772dfb75b1006c3e479c866d9f7c2

normand1 avatar Nov 16 '24 03:11 normand1

@ponderingdemocritus removed jest in favor of vitest as discussed and re-implemented one of the deleted tests as a starting point in this PR: https://github.com/ai16z/eliza/pull/365

normand1 avatar Nov 16 '24 20:11 normand1