Skip to content

Commit

Permalink
4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyaWMa committed Oct 3, 2023
1 parent dc445a4 commit a1f4c89
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bdelab/jscat",
"version": "3.0.5",
"version": "4.0.0",
"description": "A library to support IRT-based computer adaptive testing in JavaScript",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
10 changes: 5 additions & 5 deletions src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ describe('Cat', () => {
);
});

const s1: Stimulus = { difficulty: 0.5, c : 0.5, word: 'looking' };
const s2: Stimulus = { difficulty: 3.5, c : 0.5, word: 'opaque' };
const s3: Stimulus = { difficulty: 2, c : 0.5, word: 'right' };
const s4: Stimulus = { difficulty: -2.5, c : 0.5, word: 'yes' };
const s5: Stimulus = { difficulty: -1.8, c : 0.5, word: 'mom' };
const s1: Stimulus = { difficulty: 0.5, c: 0.5, word: 'looking' };
const s2: Stimulus = { difficulty: 3.5, c: 0.5, word: 'opaque' };
const s3: Stimulus = { difficulty: 2, c: 0.5, word: 'right' };
const s4: Stimulus = { difficulty: -2.5, c: 0.5, word: 'yes' };
const s5: Stimulus = { difficulty: -1.8, c: 0.5, word: 'mom' };
const stimuli = [s1, s2, s3, s4, s5];

it('constructs an adaptive test', () => {
Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,12 @@ export class Cat {

private selectorMFI(arr: Stimulus[]) {
const stimuliAddFisher = arr.map((element: Stimulus) => ({
fisherInformation: fisherInformation(this._theta, { a: element.a || 1, b: element.difficulty || 0, c: element.c || 0, d: element.d || 1 }),
fisherInformation: fisherInformation(this._theta, {
a: element.a || 1,
b: element.difficulty || 0,
c: element.c || 0,
d: element.d || 1,
}),
...element,
}));

Expand Down

0 comments on commit a1f4c89

Please sign in to comment.