@tutao/otest 3.118.29 → 3.118.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/otest.d.ts CHANGED
@@ -77,8 +77,7 @@ declare class OTest {
77
77
  export type CallableOTest = OTest & {
78
78
  /** An alias for {@link OTest.test}. Discouraged. */
79
79
  (name: string, definition: () => Promise<void> | void): void;
80
- /** An alias for {@link OTest.check}. Discouraged. */
81
- <T>(actual: T): Assertion<T>;
80
+ /** An alias for {@link OTest.check}. Discouraged. */ <T>(actual: T): Assertion<T>;
82
81
  };
83
82
  declare const _default: CallableOTest;
84
83
  export default _default;
package/dist/otest.js CHANGED
@@ -125,7 +125,10 @@ class OTest {
125
125
  async runSpec(spec, path, filter) {
126
126
  const newPath = [...path, spec];
127
127
  const newPathSerialized = newPath.map((s) => s.name).join(" > ");
128
- console.log(fancy("SPEC", ansiSequences.greenBg), newPathSerialized);
128
+ let printSpecOnce = () => {
129
+ printSpecOnce = () => { };
130
+ console.log(fancy("SPEC", ansiSequences.greenBg), newPathSerialized);
131
+ };
129
132
  for (const before of spec.before) {
130
133
  await before();
131
134
  }
@@ -135,6 +138,8 @@ class OTest {
135
138
  specResults: await promiseMap(spec.specs, (nestedSpec) => this.runSpec(nestedSpec, newPath, specMatches ? "" : filter)),
136
139
  testResults: await promiseMap(spec.tests, async (test) => {
137
140
  if (specMatches || test.name.includes(filter)) {
141
+ printSpecOnce();
142
+ printSpecOnce = () => { };
138
143
  const allBeforeEach = [...path.flatMap((s) => s.beforeEach), ...spec.beforeEach];
139
144
  for (const beforeEach of allBeforeEach) {
140
145
  await beforeEach();
@@ -148,7 +153,6 @@ class OTest {
148
153
  return testResult;
149
154
  }
150
155
  else {
151
- console.log(" ", fancy("SKIP", ansiSequences.yellowBg), fancy(test.name, ansiSequences.faint));
152
156
  return { name: test.name, errors: [], timeout: null, skipped: true };
153
157
  }
154
158
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tutao/otest",
3
- "version": "3.118.29",
3
+ "version": "3.118.31",
4
4
  "license": "GPL-3.0",
5
5
  "description": "little test runner",
6
6
  "main": "./dist/index.js",