Skip to content

Commit

Permalink
Fixing tests by moving extension data processing to v8-metadata branch
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhang03 committed Jul 8, 2024
1 parent d55674f commit b4aaa75
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 19 deletions.
9 changes: 0 additions & 9 deletions packages/jspsych/src/ExtensionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ export class ExtensionManager {
)
);

const extensionInfo = trialExtensionsConfiguration.length
? {
extension_type: results.map((result) => result.extension_type),
extension_version: results.map((result) => result.extension_version),
}
: {};

results.push(extensionInfo);

return Object.assign({}, ...results);
}
}
2 changes: 0 additions & 2 deletions packages/jspsych/src/modules/extensions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export interface JsPsychExtensionInfo {
name: string;
version: string;
data: Record<string, any>;
}

export interface JsPsychExtension {
Expand Down
2 changes: 1 addition & 1 deletion packages/jspsych/tests/extensions/test-extension.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { JsPsych, JsPsychExtension } from "../../src";
import { JsPsych, JsPsychExtension, ParameterType } from "../../src";

export class TestExtension implements JsPsychExtension {
static info = {
Expand Down
14 changes: 7 additions & 7 deletions packages/metadata/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,13 @@ export default class JsPsychMetadata {
if (ignored_fields.has(variable)) this.updateFields(variable, value, typeof value);
else {
await this.generateMetadata(variable, value, pluginType, version);
if (extensionType) {
await Promise.all(
extensionType.map((ext, index) =>
this.generateMetadata(variable, value, ext, extensionVersion[index])
)
);
}
// if (extensionType) {
// await Promise.all(
// extensionType.map((ext, index) =>
// this.generateMetadata(variable, value, ext, extensionVersion[index])
// )
// );
// }
}
}
}
Expand Down

0 comments on commit b4aaa75

Please sign in to comment.