GithubHelp home page GithubHelp logo

hirotaka / bulletproof-vue Goto Github PK

View Code? Open in Web Editor NEW
85.0 85.0 8.0 1.06 MB

Home Page: bulletproof-vue.vercel.app

Shell 0.13% JavaScript 6.28% HTML 0.24% TypeScript 52.07% Vue 41.00% CSS 0.28%

bulletproof-vue's People

Contributors

hirotaka avatar rlightner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bulletproof-vue's Issues

Chore: add typecheck #1

components

  • src/components/Elements/BaseDialog/BaseDialog.vue:19
  • src/components/Form/FormDrawer.vue:4
  • src/components/Form/MyForm.vue:15
  • src/components/Form/SelectField.vue:33
  • src/components/Layout/MainLayout.vue:9
  • src/components/Misc/MobileSidebar.vue:65
  • src/components/Notifications/ToastNotification.stories.ts:27

stores

  • src/stores/tests/notifications.test.ts:3

Bug with component created in src/test/test-utils.ts

In the render wrapper function in src/test/test-utils.ts the app component is created that wraps the component we want to test with the AppProvider component

export const render = async (
  ui: any,
  { user, ...renderOptions }: Record<string, any> = {}
) => {
  // if you want to render the app unauthenticated then pass "null" as the user
  user = await initializeUser(user);

  //   window.history.pushState({}, "Test page", route);

  // APP COMPONENT HERE
  const app = {
    components: { AppProvider, ui },
    template: `<AppProvider><ui /></AppProvider>`,
  };

  const head = createHead();
  const pinia = createPinia();

// WE USE IT HERE AS THE VALUE FOR OUR COMPONENT
  const returnValue = {
    ...vtlRender(app, {
      ...renderOptions,
      global: {
        plugins: [VueQueryPlugin, head, router, pinia],
      },
    }),
    user,
  };

  await waitForLoadingToFinish();

  return returnValue;
};

Due to this if we try and render a component with certain props using our render function. The props will not be passed to the component we want to test. The app component we made will receive the props.

Chore: add typecheck #3

features/misc

  • src/features/misc/routes/DashboardView.vue:6

features/users

  • src/features/users/api/deleteUser.ts:34
  • src/features/users/api/updateProfile.ts:29
  • src/features/users/components/index.ts:1
  • src/features/users/components/DeleteUser.vue:13
  • src/features/users/components/UserList.vue:31
  • src/features/users/components/UpdateProfile.vue:27
  • src/features/users/routes/ProfileView.vue:9

Chore: add typecheck #2

features/auth

  • src/features/auth/components/RegisterForm.vue:31
  • src/features/auth/components/LoginForm.vue:19
  • src/features/auth/routes/RegisterView.vue:15

features/comments

  • src/features/comments/api/createComment.ts:43
  • src/features/comments/api/deleteComment.ts:37
  • src/features/comments/components/DeleteComment.vue:20
  • src/features/comments/components/CommentsList.vue:23
  • src/features/comments/components/CreateComment.vue:28
  • src/features/comments/types/index.ts:1

features/discussions

  • src/features/discussions/api/createDiscussion.ts:42
  • src/features/discussions/api/deleteDiscussion.ts:38
  • src/features/discussions/api/updateDiscussion.ts:66
  • src/features/discussions/components/DiscussionsList.vue:19
  • src/features/discussions/components/DeleteDiscussion.vue:20
  • src/features/discussions/components/CreateDiscussion.vue:28
  • src/features/discussions/components/UpdateDiscussion.vue:35
  • src/features/discussions/routes/DiscussionView.vue:18

Chore: add typecheck #5

test

  • src/test/server/db.ts:47
  • src/test/server/handlers/comments.ts:62
  • src/test/server/handlers/discussions.ts:41
  • src/test/server/handlers/users.ts:66
  • src/test/server/utils.ts:1

providers

  • src/providers/AuthProvider.vue:6

components

  • src/components/Elements/BaseTable/BaseTable.vue:17
  • src/components/Elements/BaseTable/BaseTable.stories.ts:48
  • src/components/Elements/ConfirmationDialog/ConfirmationDialog.vue:39
  • src/components/Misc/UserNavigation.vue:12
  • src/components/Misc/SideNavigation.vue:13

Chore: add typecheck #4

composables

  • src/composables/useAuth.tsx:72
  • src/composables/useAuthorization.ts:28
  • src/composables/useDisclosure.ts:6

lib

  • src/lib/axios.ts:1
  • src/lib/vue-query-auth.tsx:39
  • src/lib/vue-query.ts:1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.