diff --git a/source/app/action/index.mjs b/source/app/action/index.mjs index b8460ad3..674eff22 100644 --- a/source/app/action/index.mjs +++ b/source/app/action/index.mjs @@ -8,7 +8,7 @@ import sgit from "simple-git" import processes from "child_process" import metrics from "../metrics/index.mjs" import setup from "../metrics/setup.mjs" -import mocks from "../mocks/index.mjs" +import mocks from "../../../tests/mocks/index.mjs" process.on("unhandledRejection", error => { throw error }) diff --git a/source/app/web/instance.mjs b/source/app/web/instance.mjs index e53bd547..bbdfa4b6 100644 --- a/source/app/web/instance.mjs +++ b/source/app/web/instance.mjs @@ -8,7 +8,7 @@ import cache from "memory-cache" import util from "util" import metrics from "../metrics/index.mjs" import setup from "../metrics/setup.mjs" -import mocks from "../mocks/index.mjs" +import mocks from "../../../tests/mocks/index.mjs" /**App */ export default async function({mock, nosettings} = {}) { diff --git a/source/app/mocks/.eslintrc.yml b/tests/mocks/.eslintrc.yml similarity index 100% rename from source/app/mocks/.eslintrc.yml rename to tests/mocks/.eslintrc.yml diff --git a/source/app/mocks/api/axios/get/lastfm.mjs b/tests/mocks/api/axios/get/lastfm.mjs similarity index 100% rename from source/app/mocks/api/axios/get/lastfm.mjs rename to tests/mocks/api/axios/get/lastfm.mjs diff --git a/source/app/mocks/api/axios/get/nightscout.mjs b/tests/mocks/api/axios/get/nightscout.mjs similarity index 100% rename from source/app/mocks/api/axios/get/nightscout.mjs rename to tests/mocks/api/axios/get/nightscout.mjs diff --git a/source/app/mocks/api/axios/get/pagespeed.mjs b/tests/mocks/api/axios/get/pagespeed.mjs similarity index 100% rename from source/app/mocks/api/axios/get/pagespeed.mjs rename to tests/mocks/api/axios/get/pagespeed.mjs diff --git a/source/app/mocks/api/axios/get/poopmap.mjs b/tests/mocks/api/axios/get/poopmap.mjs similarity index 100% rename from source/app/mocks/api/axios/get/poopmap.mjs rename to tests/mocks/api/axios/get/poopmap.mjs diff --git a/source/app/mocks/api/axios/get/spotify.mjs b/tests/mocks/api/axios/get/spotify.mjs similarity index 100% rename from source/app/mocks/api/axios/get/spotify.mjs rename to tests/mocks/api/axios/get/spotify.mjs diff --git a/source/app/mocks/api/axios/get/stackoverflow.mjs b/tests/mocks/api/axios/get/stackoverflow.mjs similarity index 100% rename from source/app/mocks/api/axios/get/stackoverflow.mjs rename to tests/mocks/api/axios/get/stackoverflow.mjs diff --git a/source/app/mocks/api/axios/get/twitter.mjs b/tests/mocks/api/axios/get/twitter.mjs similarity index 100% rename from source/app/mocks/api/axios/get/twitter.mjs rename to tests/mocks/api/axios/get/twitter.mjs diff --git a/source/app/mocks/api/axios/get/wakatime.mjs b/tests/mocks/api/axios/get/wakatime.mjs similarity index 100% rename from source/app/mocks/api/axios/get/wakatime.mjs rename to tests/mocks/api/axios/get/wakatime.mjs diff --git a/source/app/mocks/api/axios/get/yahoo.mjs b/tests/mocks/api/axios/get/yahoo.mjs similarity index 100% rename from source/app/mocks/api/axios/get/yahoo.mjs rename to tests/mocks/api/axios/get/yahoo.mjs diff --git a/source/app/mocks/api/axios/post/anilist.mjs b/tests/mocks/api/axios/post/anilist.mjs similarity index 100% rename from source/app/mocks/api/axios/post/anilist.mjs rename to tests/mocks/api/axios/post/anilist.mjs diff --git a/source/app/mocks/api/axios/post/hashnode.mjs b/tests/mocks/api/axios/post/hashnode.mjs similarity index 100% rename from source/app/mocks/api/axios/post/hashnode.mjs rename to tests/mocks/api/axios/post/hashnode.mjs diff --git a/source/app/mocks/api/axios/post/spotify.mjs b/tests/mocks/api/axios/post/spotify.mjs similarity index 100% rename from source/app/mocks/api/axios/post/spotify.mjs rename to tests/mocks/api/axios/post/spotify.mjs diff --git a/source/app/mocks/api/axios/post/youtubemusic.mjs b/tests/mocks/api/axios/post/youtubemusic.mjs similarity index 100% rename from source/app/mocks/api/axios/post/youtubemusic.mjs rename to tests/mocks/api/axios/post/youtubemusic.mjs diff --git a/source/app/mocks/api/github/graphql/achievements.default.mjs b/tests/mocks/api/github/graphql/achievements.default.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/achievements.default.mjs rename to tests/mocks/api/github/graphql/achievements.default.mjs diff --git a/source/app/mocks/api/github/graphql/achievements.metrics.mjs b/tests/mocks/api/github/graphql/achievements.metrics.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/achievements.metrics.mjs rename to tests/mocks/api/github/graphql/achievements.metrics.mjs diff --git a/source/app/mocks/api/github/graphql/achievements.octocat.mjs b/tests/mocks/api/github/graphql/achievements.octocat.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/achievements.octocat.mjs rename to tests/mocks/api/github/graphql/achievements.octocat.mjs diff --git a/source/app/mocks/api/github/graphql/achievements.organizations.mjs b/tests/mocks/api/github/graphql/achievements.organizations.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/achievements.organizations.mjs rename to tests/mocks/api/github/graphql/achievements.organizations.mjs diff --git a/source/app/mocks/api/github/graphql/achievements.ranking.mjs b/tests/mocks/api/github/graphql/achievements.ranking.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/achievements.ranking.mjs rename to tests/mocks/api/github/graphql/achievements.ranking.mjs diff --git a/source/app/mocks/api/github/graphql/base.calendar.mjs b/tests/mocks/api/github/graphql/base.calendar.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/base.calendar.mjs rename to tests/mocks/api/github/graphql/base.calendar.mjs diff --git a/source/app/mocks/api/github/graphql/base.contributions.mjs b/tests/mocks/api/github/graphql/base.contributions.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/base.contributions.mjs rename to tests/mocks/api/github/graphql/base.contributions.mjs diff --git a/source/app/mocks/api/github/graphql/base.field.mjs b/tests/mocks/api/github/graphql/base.field.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/base.field.mjs rename to tests/mocks/api/github/graphql/base.field.mjs diff --git a/source/app/mocks/api/github/graphql/base.field.repositories.mjs b/tests/mocks/api/github/graphql/base.field.repositories.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/base.field.repositories.mjs rename to tests/mocks/api/github/graphql/base.field.repositories.mjs diff --git a/source/app/mocks/api/github/graphql/base.repositories.mjs b/tests/mocks/api/github/graphql/base.repositories.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/base.repositories.mjs rename to tests/mocks/api/github/graphql/base.repositories.mjs diff --git a/source/app/mocks/api/github/graphql/base.repository.mjs b/tests/mocks/api/github/graphql/base.repository.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/base.repository.mjs rename to tests/mocks/api/github/graphql/base.repository.mjs diff --git a/source/app/mocks/api/github/graphql/base.user.mjs b/tests/mocks/api/github/graphql/base.user.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/base.user.mjs rename to tests/mocks/api/github/graphql/base.user.mjs diff --git a/source/app/mocks/api/github/graphql/contributors.commit.mjs b/tests/mocks/api/github/graphql/contributors.commit.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/contributors.commit.mjs rename to tests/mocks/api/github/graphql/contributors.commit.mjs diff --git a/source/app/mocks/api/github/graphql/discussions.categories.mjs b/tests/mocks/api/github/graphql/discussions.categories.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/discussions.categories.mjs rename to tests/mocks/api/github/graphql/discussions.categories.mjs diff --git a/source/app/mocks/api/github/graphql/discussions.comments.mjs b/tests/mocks/api/github/graphql/discussions.comments.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/discussions.comments.mjs rename to tests/mocks/api/github/graphql/discussions.comments.mjs diff --git a/source/app/mocks/api/github/graphql/discussions.statistics.mjs b/tests/mocks/api/github/graphql/discussions.statistics.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/discussions.statistics.mjs rename to tests/mocks/api/github/graphql/discussions.statistics.mjs diff --git a/source/app/mocks/api/github/graphql/followup.repository.collaborators.mjs b/tests/mocks/api/github/graphql/followup.repository.collaborators.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/followup.repository.collaborators.mjs rename to tests/mocks/api/github/graphql/followup.repository.collaborators.mjs diff --git a/source/app/mocks/api/github/graphql/followup.repository.mjs b/tests/mocks/api/github/graphql/followup.repository.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/followup.repository.mjs rename to tests/mocks/api/github/graphql/followup.repository.mjs diff --git a/source/app/mocks/api/github/graphql/followup.user.mjs b/tests/mocks/api/github/graphql/followup.user.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/followup.user.mjs rename to tests/mocks/api/github/graphql/followup.user.mjs diff --git a/source/app/mocks/api/github/graphql/gists.default.mjs b/tests/mocks/api/github/graphql/gists.default.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/gists.default.mjs rename to tests/mocks/api/github/graphql/gists.default.mjs diff --git a/source/app/mocks/api/github/graphql/introduction.organization.mjs b/tests/mocks/api/github/graphql/introduction.organization.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/introduction.organization.mjs rename to tests/mocks/api/github/graphql/introduction.organization.mjs diff --git a/source/app/mocks/api/github/graphql/introduction.repository.mjs b/tests/mocks/api/github/graphql/introduction.repository.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/introduction.repository.mjs rename to tests/mocks/api/github/graphql/introduction.repository.mjs diff --git a/source/app/mocks/api/github/graphql/introduction.user.mjs b/tests/mocks/api/github/graphql/introduction.user.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/introduction.user.mjs rename to tests/mocks/api/github/graphql/introduction.user.mjs diff --git a/source/app/mocks/api/github/graphql/isocalendar.calendar.mjs b/tests/mocks/api/github/graphql/isocalendar.calendar.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/isocalendar.calendar.mjs rename to tests/mocks/api/github/graphql/isocalendar.calendar.mjs diff --git a/source/app/mocks/api/github/graphql/licenses.default.mjs b/tests/mocks/api/github/graphql/licenses.default.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/licenses.default.mjs rename to tests/mocks/api/github/graphql/licenses.default.mjs diff --git a/source/app/mocks/api/github/graphql/licenses.repository.mjs b/tests/mocks/api/github/graphql/licenses.repository.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/licenses.repository.mjs rename to tests/mocks/api/github/graphql/licenses.repository.mjs diff --git a/source/app/mocks/api/github/graphql/notable.contributions.mjs b/tests/mocks/api/github/graphql/notable.contributions.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/notable.contributions.mjs rename to tests/mocks/api/github/graphql/notable.contributions.mjs diff --git a/source/app/mocks/api/github/graphql/people.default.mjs b/tests/mocks/api/github/graphql/people.default.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/people.default.mjs rename to tests/mocks/api/github/graphql/people.default.mjs diff --git a/source/app/mocks/api/github/graphql/people.repository.mjs b/tests/mocks/api/github/graphql/people.repository.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/people.repository.mjs rename to tests/mocks/api/github/graphql/people.repository.mjs diff --git a/source/app/mocks/api/github/graphql/people.sponsors.mjs b/tests/mocks/api/github/graphql/people.sponsors.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/people.sponsors.mjs rename to tests/mocks/api/github/graphql/people.sponsors.mjs diff --git a/source/app/mocks/api/github/graphql/projects.repository.mjs b/tests/mocks/api/github/graphql/projects.repository.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/projects.repository.mjs rename to tests/mocks/api/github/graphql/projects.repository.mjs diff --git a/source/app/mocks/api/github/graphql/projects.user.mjs b/tests/mocks/api/github/graphql/projects.user.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/projects.user.mjs rename to tests/mocks/api/github/graphql/projects.user.mjs diff --git a/source/app/mocks/api/github/graphql/reactions.default.mjs b/tests/mocks/api/github/graphql/reactions.default.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/reactions.default.mjs rename to tests/mocks/api/github/graphql/reactions.default.mjs diff --git a/source/app/mocks/api/github/graphql/repositories.repository.mjs b/tests/mocks/api/github/graphql/repositories.repository.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/repositories.repository.mjs rename to tests/mocks/api/github/graphql/repositories.repository.mjs diff --git a/source/app/mocks/api/github/graphql/sponsors.default.mjs b/tests/mocks/api/github/graphql/sponsors.default.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/sponsors.default.mjs rename to tests/mocks/api/github/graphql/sponsors.default.mjs diff --git a/source/app/mocks/api/github/graphql/stargazers.default.mjs b/tests/mocks/api/github/graphql/stargazers.default.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/stargazers.default.mjs rename to tests/mocks/api/github/graphql/stargazers.default.mjs diff --git a/source/app/mocks/api/github/graphql/stars.default.mjs b/tests/mocks/api/github/graphql/stars.default.mjs similarity index 100% rename from source/app/mocks/api/github/graphql/stars.default.mjs rename to tests/mocks/api/github/graphql/stars.default.mjs diff --git a/source/app/mocks/api/github/rest/activity/listEventsForAuthenticatedUser.mjs b/tests/mocks/api/github/rest/activity/listEventsForAuthenticatedUser.mjs similarity index 100% rename from source/app/mocks/api/github/rest/activity/listEventsForAuthenticatedUser.mjs rename to tests/mocks/api/github/rest/activity/listEventsForAuthenticatedUser.mjs diff --git a/source/app/mocks/api/github/rest/activity/listRepoEvents.mjs b/tests/mocks/api/github/rest/activity/listRepoEvents.mjs similarity index 100% rename from source/app/mocks/api/github/rest/activity/listRepoEvents.mjs rename to tests/mocks/api/github/rest/activity/listRepoEvents.mjs diff --git a/source/app/mocks/api/github/rest/emojis/get.mjs b/tests/mocks/api/github/rest/emojis/get.mjs similarity index 100% rename from source/app/mocks/api/github/rest/emojis/get.mjs rename to tests/mocks/api/github/rest/emojis/get.mjs diff --git a/source/app/mocks/api/github/rest/rateLimit/get.mjs b/tests/mocks/api/github/rest/rateLimit/get.mjs similarity index 100% rename from source/app/mocks/api/github/rest/rateLimit/get.mjs rename to tests/mocks/api/github/rest/rateLimit/get.mjs diff --git a/source/app/mocks/api/github/rest/repos/getContributorsStats.mjs b/tests/mocks/api/github/rest/repos/getContributorsStats.mjs similarity index 100% rename from source/app/mocks/api/github/rest/repos/getContributorsStats.mjs rename to tests/mocks/api/github/rest/repos/getContributorsStats.mjs diff --git a/source/app/mocks/api/github/rest/repos/getViews.mjs b/tests/mocks/api/github/rest/repos/getViews.mjs similarity index 100% rename from source/app/mocks/api/github/rest/repos/getViews.mjs rename to tests/mocks/api/github/rest/repos/getViews.mjs diff --git a/source/app/mocks/api/github/rest/repos/listCommits.mjs b/tests/mocks/api/github/rest/repos/listCommits.mjs similarity index 100% rename from source/app/mocks/api/github/rest/repos/listCommits.mjs rename to tests/mocks/api/github/rest/repos/listCommits.mjs diff --git a/source/app/mocks/api/github/rest/repos/listContributors.mjs b/tests/mocks/api/github/rest/repos/listContributors.mjs similarity index 100% rename from source/app/mocks/api/github/rest/repos/listContributors.mjs rename to tests/mocks/api/github/rest/repos/listContributors.mjs diff --git a/source/app/mocks/api/github/rest/request.mjs b/tests/mocks/api/github/rest/request.mjs similarity index 100% rename from source/app/mocks/api/github/rest/request.mjs rename to tests/mocks/api/github/rest/request.mjs diff --git a/source/app/mocks/api/github/rest/users/getByUsername.mjs b/tests/mocks/api/github/rest/users/getByUsername.mjs similarity index 100% rename from source/app/mocks/api/github/rest/users/getByUsername.mjs rename to tests/mocks/api/github/rest/users/getByUsername.mjs diff --git a/source/app/mocks/index.mjs b/tests/mocks/index.mjs similarity index 100% rename from source/app/mocks/index.mjs rename to tests/mocks/index.mjs