# Compare AI models — your measurement worksheet

No measurements are prefilled. Use one copy per model and attempt.

## Setup
Date:
Provider / exact model ID / reasoning:
Client / gateway / provider / account or API type:
Runtime / tools / test version:
Current data terms checked:

## Measurement
First attempt — passing test groups out of 8:
Initial terminal output and solution saved in:
Fixing rounds:
Total waiting time:
My own work time:
Reported API cost (or unavailable):
Reported subscription quota (or unavailable):
Final test result:
What I had to fix / check:
Number of independent attempts:
Limitations and choice for my task:

## Same task — keep the wording identical for every model

```text
Implement countCompleted(tasks) in solution.mjs as a named export.
Use JavaScript ES modules, without dependencies or network access.
tasks must be an array. Every entry must be a non-null object with a
completed property whose value is a boolean. Reject invalid inputs
with TypeError. Return the number of entries where completed === true.
An empty array returns 0. Do not mutate the array or its entries.
Only create solution.mjs. Explain how to run the supplied tests.
Do not modify the tests or install packages.
```

## solution.test.mjs

```js
import test from 'node:test';
import assert from 'node:assert/strict';
import { countCompleted } from './solution.mjs';

test('empty array returns zero', () => {
  assert.equal(countCompleted([]), 0);
});
test('counts completed tasks only', () => {
  assert.equal(countCompleted([
    { completed: true }, { completed: false }, { completed: true }
  ]), 2);
});
test('all incomplete tasks return zero', () => {
  assert.equal(countCompleted([{ completed: false }]), 0);
});
test('rejects non-array inputs', () => {
  for (const value of [null, void 0, {}, 'tasks', 3]) {
    assert.throws(() => countCompleted(value), TypeError);
  }
});
test('rejects null or primitive entries', () => {
  for (const value of [null, void 0, false, 1, 'task']) {
    assert.throws(() => countCompleted([value]), TypeError);
  }
});
test('rejects missing completed property', () => {
  assert.throws(() => countCompleted([{}]), TypeError);
});
test('rejects non-boolean completed values', () => {
  for (const completed of ['true', 1, 0, null, void 0]) {
    assert.throws(() => countCompleted([{ completed }]), TypeError);
  }
});
test('does not change the inputs', () => {
  const tasks = Object.freeze([
    Object.freeze({ completed: true, title: 'Demo' }),
    Object.freeze({ completed: false, title: 'Example' })
  ]);
  assert.equal(countCompleted(tasks), 1);
  assert.deepEqual(tasks, [
    { completed: true, title: 'Demo' },
    { completed: false, title: 'Example' }
  ]);
});
```

## Run in the practice folder (Node.js 22+)

```sh
node --test solution.test.mjs
```

https://alexndrxc.com/en/guides/velg-ai-modell/
