Add first tests for valdi_rxjs

未关闭
#218 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
78/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
testing

调研方向

Start in src/valdi_modules/src/valdi/valdi_rxjs and look at its BUILD.bazel, then copy the test layout from valdi_test/BUILD.bazel, adding a test/ folder with test/**/*.ts in srcs and the jasmine dependency in test_deps. Read the Observable, Subject, BehaviorSubject and ReplaySubject sources, plus the helpers in src/testing/ for marble tests. Done when bazel test //src/valdi_modules/src/valdi/valdi_rxjs:test runs specs for the core types and passes.

由索引模型根据 Issue 内容生成。

描述

src/valdi_modules/src/valdi/valdi_rxjs has no tests. It's Valdi's port of RxJS (Observable, Subject, BehaviorSubject, ReplaySubject, the operators, firstValueFrom/lastValueFrom and so on), and other modules depend on it.

What to do

  1. Add a test/ folder to the module, and add test/**/*.ts to srcs in its BUILD.bazel. Add //src/valdi_modules/src/valdi/jasmine to test_deps. valdi_test/BUILD.bazel is a working example.
  2. Write a first set of specs for the core types: subscribe and unsubscribe, Subject and BehaviorSubject emission, ReplaySubject buffering, error and complete propagation, and a few common operators (map, filter, switchMap). The helpers in src/testing/ can be used for marble-style tests.

A first PR doesn't need to cover everything. A small, solid set of specs is a good start.

How to run

bazel test //src/valdi_modules/src/valdi/valdi_rxjs:test

See Testing for how module tests work.

Done when: the module has a test target with specs for the core types, and it passes.

See CONTRIBUTING.md before opening a pull request.

主要语言
C++
星标
16.4k
派生
538
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Snapchat/Valdi 的其他 Issue

查看 Snapchat/Valdi 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。