Skip to content

Commit

Permalink
change @todo comments so they are picked up by recommend Todo Tree vs…
Browse files Browse the repository at this point in the history
…code module
  • Loading branch information
Muttley committed Sep 16, 2023
1 parent 77151e3 commit d8c4df7
Show file tree
Hide file tree
Showing 18 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion system/shadowdark.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Hooks.once("init", () => {
CONFIG.Item.documentClass = documents.ItemSD;
CONFIG.DiceSD = dice.DiceSD;

// @todo: V11 Compatability legacyTransferral
// TODO: V11 Compatability legacyTransferral
// Update to use the designed interface as specified here, once implemented into core
// https://github.com/foundryvtt/foundryvtt/issues/9185
if (game.version.split(".")[0] >= 11) CONFIG.ActiveEffect.legacyTransferral = true;
Expand Down
8 changes: 4 additions & 4 deletions system/src/apps/EffectPanelSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class EffectPanelControllerSD {
const actor = this._actor;
if (!actor) return [];

// @todo: V11 Compatability legacyTransferral
// TODO: V11 Compatability legacyTransferral
// Update to use the designed interface as specified here, once implemented into core
// https://github.com/foundryvtt/foundryvtt/issues/9185
const sortedEffects = actor.effects
Expand Down Expand Up @@ -299,7 +299,7 @@ export class EffectPanelControllerSD {
async onIconRightClick(event) {
const $target = $(event.currentTarget);
const actor = this._actor;
// @todo: V11 Compatability legacyTransferral
// TODO: V11 Compatability legacyTransferral
// Update to use the designed interface as specified here, once implemented into core
// https://github.com/foundryvtt/foundryvtt/issues/9185
const effect = actor?.effects.get($target[0].dataset.effectId ?? "");
Expand All @@ -308,7 +308,7 @@ export class EffectPanelControllerSD {

const sourceItem = this._getSource(effect);

// @todo: Consider allowing default behavior to just delete effect item in settings.
// TODO: Consider allowing default behavior to just delete effect item in settings.
return Dialog.confirm({
title: game.i18n.localize("SHADOWDARK.apps.effect_panel.dialog.delete_effect.title"),
content: `<h4>${game.i18n.format(
Expand All @@ -334,7 +334,7 @@ export class EffectPanelControllerSD {
async onIconClick(event) {
const $target = $(event.currentTarget);
const actor = this._actor;
// @todo: V11 Compatability legacyTransferral
// TODO: V11 Compatability legacyTransferral
// Update to use the designed interface as specified here, once implemented into core
// https://github.com/foundryvtt/foundryvtt/issues/9185
const effect = actor?.effects.get($target[0].dataset.effectId ?? "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ export default ({ describe, it, after, afterEach, expect }) => {
});

it("weapon mastery", async () => {
// @todo: Weapon mastery for all types of weapons
// TODO: Weapon mastery for all types of weapons
json.bonuses = [
{
sourceType: "Class",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default ({ describe, it, after, before, expect }) => {
});

describe("render(force, options)", () => {
// @todo: Write tests if you figure out how to mock another user
// TODO: Write tests if you figure out how to mock another user
});

describe("toggleInterface()", () => {
Expand All @@ -73,7 +73,7 @@ export default ({ describe, it, after, before, expect }) => {
});

describe("toggleLightSource()", () => {
// @todo: Figure out how to test sockets
// TODO: Figure out how to test sockets
// Mock an actor and test if there is a socket message in console
// Mock actor and activate a lightsource
});
Expand Down Expand Up @@ -202,6 +202,6 @@ export default ({ describe, it, after, before, expect }) => {
});

describe("onUpdateWorldTime", () => {
// @todo: figure out how to test
// TODO: figure out how to test
});
};
2 changes: 1 addition & 1 deletion system/src/chat/__tests__/chat-chatcard.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const options = {
};

export default ({ describe, it, after, before, expect }) => {
// @todo: implement these tests when the dice mocking tests are functional
// TODO: implement these tests when the dice mocking tests are functional
// so we can mock results properly.
describe("highlightSuccessFailure(app, html, data)", () => {});
};
2 changes: 1 addition & 1 deletion system/src/dice/RollSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ export default class RollSD extends Roll {
options.target
);

// @todo: Write tests for this.
// TODO: Write tests for this.
// Add whether the roll succeeded or not to the roll data
data.rolls.main.success = (chatData.flags.success)
? chatData.flags.success
Expand Down
2 changes: 1 addition & 1 deletion system/src/dice/__tests__/dice-chat-templates.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export default ({ describe, it, after, before, expect }) => {
before(async () => {
data.item = await createMockItemByKey(key, "Weapon");
data.actor = await createMockActorByKey(key, "Player");
// @todo: Have the function generate this instead
// TODO: Have the function generate this instead
data.rolls = {
main: mockRollResult(20, 15),
primaryDamage: mockRollResult(8, 4),
Expand Down
2 changes: 1 addition & 1 deletion system/src/documents/ActorSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ export default class ActorSD extends Actor {

const parts = ["@abilityBonus", "@talentBonus"];

// @todo: push to parts & for set talentBonus as sum of talents affecting spell rolls
// TODO: push to parts & for set talentBonus as sum of talents affecting spell rolls

return item.rollSpell(parts, data);
}
Expand Down
6 changes: 3 additions & 3 deletions system/src/documents/ItemSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -322,15 +322,15 @@ export default class ItemSD extends Item {
* @returns {Object}
*/
async _handlePredefinedEffect(key, value) {
// @todo: CUSTOMIZATION How to generalize this with custom expansion of base items?
// TODO: CUSTOMIZATION How to generalize this with custom expansion of base items?
if (["weaponMastery", "weaponDamageDieD12"].includes(key)) {
return this._askEffectInput("weapon", CONFIG.SHADOWDARK.WEAPON_BASE_WEAPON);
}
else if (key === "armorMastery") {
return this._askEffectInput("armor", CONFIG.SHADOWDARK.ARMOR_BASE_ARMOR);
}
else if (key === "spellAdvantage") {
// @todo: CUSTOMIZATION Allow custom spell compendiums
// TODO: CUSTOMIZATION Allow custom spell compendiums
const spellNames = await this.getSpellListSlugified();
return this._askEffectInput("spell", spellNames);
}
Expand Down Expand Up @@ -447,7 +447,7 @@ export default class ItemSD extends Item {
* @returns {Array<string>}
*/
async getSpellListSlugified() {
// @todo: CUSTOMIZATION Allow custom spell compendiums
// TODO: CUSTOMIZATION Allow custom spell compendiums
const spellPack = game.packs.get("shadowdark.spells");
const spellDocuments = await spellPack.getDocuments();
const spellNames = {};
Expand Down
2 changes: 1 addition & 1 deletion system/src/documents/__tests__/documents-actor.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default ({ describe, it, after, before, expect }) => {
expect(actor.system.move).is.not.undefined;
});
// Expecting attacks to be items rather than system data
// @todo: Write tests for attacks
// TODO: Write tests for attacks

after(async () => {
await actor.delete();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default ({ describe, it, before, after, afterEach, expect }) => {
await cleanUpItemsByKey(key);
});

// @todo: This only checks that the effects are carried over to the
// TODO: This only checks that the effects are carried over to the
// item. This seems to be the way Foundry works, and will probably
// change with V11.
it("weaponAttackBonus", async () => {
Expand Down Expand Up @@ -304,7 +304,7 @@ export default ({ describe, it, before, after, afterEach, expect }) => {
await cleanUpItemsByKey(key);
});

// @todo: This only checks that the effects are carried over to the
// TODO: This only checks that the effects are carried over to the
// item. This seems to be the way Foundry works, and will probably
// change with V11.
it("critMultiplier", async () => {
Expand Down Expand Up @@ -347,7 +347,7 @@ export default ({ describe, it, before, after, afterEach, expect }) => {
await cleanUpItemsByKey(key);
});

// @todo: This only checks that the effects are carried over to the
// TODO: This only checks that the effects are carried over to the
// item. This seems to be the way Foundry works, and will probably
// change with V11.
it("weaponDamageBonus", async () => {
Expand Down Expand Up @@ -385,7 +385,7 @@ export default ({ describe, it, before, after, afterEach, expect }) => {
await cleanUpItemsByKey(key);
});

// @todo: This only checks that the effects are carried over to the
// TODO: This only checks that the effects are carried over to the
// item. This seems to be the way Foundry works, and will probably
// change with V11.
it("damageMultiplier", async () => {
Expand Down
6 changes: 3 additions & 3 deletions system/src/documents/__tests__/documents-item-spell.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default ({ describe, it, after, beforeEach, before, expect }) => {
await waitForInput();
expect(game.messages.size).equal(1);

// @todo: This should probably dig inside chatcard instead
// TODO: This should probably dig inside chatcard instead
const formula = $(".dice-formula")[0].innerText;
expect(formula).equal("1d20");
});
Expand All @@ -109,7 +109,7 @@ export default ({ describe, it, after, beforeEach, before, expect }) => {
await waitForInput();
expect(game.messages.size).equal(1);

// @todo: This should probably dig inside chatcard instead
// TODO: This should probably dig inside chatcard instead
const formula = $(".dice-formula")[0].innerText;
expect(formula).equal("1d20 + 1");
});
Expand All @@ -134,7 +134,7 @@ export default ({ describe, it, after, beforeEach, before, expect }) => {
await waitForInput();
expect(game.messages.size).equal(1);

// @todo: This should probably dig inside chatcard instead
// TODO: This should probably dig inside chatcard instead
const formula = $(".dice-formula")[0].innerText;
expect(formula).equal("1d20 + 3");
});
Expand Down
2 changes: 1 addition & 1 deletion system/src/sheets/ItemSheetSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ export default class ItemSheetSD extends ItemSheet {
return effects;
}

// @todo: CUSTOMIZATION Extend this with custom paths as for the art mapping
// TODO: CUSTOMIZATION Extend this with custom paths as for the art mapping
/**
* Reads the predefined effects mapping json file and returns it as a JSON object.
* @returns {Object}
Expand Down
2 changes: 1 addition & 1 deletion system/src/sheets/LightSheetSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ActorSheetSD from "./ActorSheetSD.mjs";

export default class LightSheetSD extends ActorSheetSD {

// @todo: How to add a button to the token HUD for picking up torch?
// TODO: How to add a button to the token HUD for picking up torch?

/** @inheritdoc */
static get defaultOptions() {
Expand Down
24 changes: 12 additions & 12 deletions system/src/sheets/__tests__/sheets-actor-player.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default ({ describe, it, after, before, expect }) => {
});

/* Event-based methods */
// @todo: Write tests
// TODO: Write tests
describe("_onItemQuantityDecrement(event)", () => {
let actor = {};

Expand All @@ -128,10 +128,10 @@ export default ({ describe, it, after, before, expect }) => {
await waitForInput();
await document.querySelector("a[data-tab=\"tab-inventory\"]").click();
await waitForInput();
// @todo: create item with quantity
// TODO: create item with quantity
});

// @todo: write tests when sheet functions are implemented
// TODO: write tests when sheet functions are implemented
it("decreases quantity when clicked in Player sheet", async () => {});
it("deletes item when quantity becomes 0", async () => {});

Expand All @@ -141,7 +141,7 @@ export default ({ describe, it, after, before, expect }) => {
});
});

// @todo: Write tests
// TODO: Write tests
describe("_onItemQuantityIncrement(event)", () => {
let actor = {};

Expand All @@ -151,10 +151,10 @@ export default ({ describe, it, after, before, expect }) => {
await waitForInput();
await document.querySelector("a[data-tab=\"tab-inventory\"]").click();
await waitForInput();
// @todo: create item with quantity
// TODO: create item with quantity
});

// @todo: write tests when sheet functions are implemented
// TODO: write tests when sheet functions are implemented
it("increases quantity when clicked in Player sheet", async () => {});
it("increases slots used when exceeding per slot value", async () => {});

Expand Down Expand Up @@ -231,7 +231,7 @@ export default ({ describe, it, after, before, expect }) => {
await waitForInput();
});

// @todo: If implementing quick-keys for rolling with adv/disadv
// TODO: If implementing quick-keys for rolling with adv/disadv
// store & restore settings here!

abilities.forEach(ability => {
Expand Down Expand Up @@ -262,7 +262,7 @@ export default ({ describe, it, after, before, expect }) => {
expect(game.messages.size).equal(1);
const message = game.messages.contents.pop();

// @todo: Test the resulting roll chat card
// TODO: Test the resulting roll chat card

await message.delete();
await waitForInput();
Expand Down Expand Up @@ -361,12 +361,12 @@ export default ({ describe, it, after, before, expect }) => {

/* Non-event tests */

// @todo: determine what tests are needed here, has a lot of branches
// @todo: Write tests
// TODO: determine what tests are needed here, has a lot of branches
// TODO: Write tests
describe("_prepareItems(context)", () => {});

// @todo: is there any circumstance where this needs to be tested more than
// TODO: is there any circumstance where this needs to be tested more than
// already done in _prepareItems(context)?
// @todo: Write tests
// TODO: Write tests
describe("_sortAllItems(context)", () => {});
};
16 changes: 8 additions & 8 deletions system/src/sheets/__tests__/sheets-actor.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export default ({ describe, it, after, before, expect }) => {
await closeDialogs();
});

// @todo: Generalize tests and run for Player & NPC
// @todo: Split out special cases for Players & NPCs
// TODO: Generalize tests and run for Player & NPC
// TODO: Split out special cases for Players & NPCs
describe("getData(options)", () => {
let actor = {};
let actorSheetData = {};
Expand All @@ -65,7 +65,7 @@ export default ({ describe, it, after, before, expect }) => {
expect(actorSheetData.cssClass).equal("editable");
});

// @todo: how should we mock non-owner?
// TODO: how should we mock non-owner?
it("sets locked css class for non-owner", async () => {});

it("isNpc is false for Player actor", async () => {
Expand All @@ -89,7 +89,7 @@ export default ({ describe, it, after, before, expect }) => {
expect(actorSheetData.owner).is.true;
});

// @todo: how to test the `rollData`?
// TODO: how to test the `rollData`?
it("rollData bound from actors getRollData", async () => {});

it("contains the source system data", async () => {
Expand All @@ -102,12 +102,12 @@ export default ({ describe, it, after, before, expect }) => {
// expect(actorSheetData.system).equal(actor.system);
});

// @todo: write tests for this when it is part of the context
// TODO: write tests for this when it is part of the context
describe("abiltiy scores for are", () => {
abilities.forEach(ability => {
it(`translated label for ${ability}`, async () => {});
// Deeply tested in documents-actor.test.mjs
// @todo: write simple tests with non-0 modifier
// TODO: write simple tests with non-0 modifier
it("has modifiers calculated for player", async () => {});
});
});
Expand Down Expand Up @@ -145,7 +145,7 @@ export default ({ describe, it, after, before, expect }) => {

before(async () => {
actor = await createMockActor("Player");
// @todo: Does not work for Gem right now, test for all items.
// TODO: Does not work for Gem right now, test for all items.
item = await createMockItem("Armor");
await actor.createEmbeddedDocuments("Item", [item]);
actorItem = await actor.items.contents[0];
Expand Down Expand Up @@ -237,7 +237,7 @@ export default ({ describe, it, after, before, expect }) => {
await waitForInput();
const deleteDialogs = Object.values(ui.windows).filter(o => o.options.classes.includes("dialog"));
expect(deleteDialogs.length).equal(1);
// @todo: i18n
// TODO: i18n
expect(deleteDialogs[0].data.title).equal("Confirm Deletion");
});

Expand Down
4 changes: 2 additions & 2 deletions system/src/sheets/__tests__/sheets-item.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default ({ describe, it, after, before, expect }) => {
await openDialogs.pop().close();
});

// @todo: verify all properties are present in dialog
// TODO: verify all properties are present in dialog

after(async () => {
await item.delete();
Expand All @@ -161,7 +161,7 @@ export default ({ describe, it, after, before, expect }) => {
await openDialogs.pop().close();
});

// @todo: verify all properties are present in dialog
// TODO: verify all properties are present in dialog

after(async () => {
await item.delete();
Expand Down
Loading

0 comments on commit d8c4df7

Please sign in to comment.