Chat App is a mock WhatsApp application in which this project was also inspired by. The idea behind this project was to recreate the basic features and functionalities that exist in WhatsApp. The backend project for this project is called chat-app-backend.
I mainly started this project in order to demonstrate and apply what I've learned working with tools and technologies I was previously unfamiliar with to create this project.
Users are able to Signup and Login to begin chatting with other users on the platform. Users will be able to tell when other users are typing in real-time and creating group or individual chats.
- Node.js v14
- TypeScript
Before starting development, install dependencies:
npm install
To begin local development:
npm run dev
Build application to run a local prod server:
npm run local-prod
-
The Vuex documentation for writing tests that mock actions suggests using webpack and inject-loader. As it turns out the example for mocking actions is outdated and other methods of mocking actions should be used since vue-loader no longer works with inject-loader.
-
In our test files Vue has to be bootstrapped in order for Vuetify to work properly on the version this project is using. See the comment on the issue about this.
Docs: https://next.vuetifyjs.com/en/getting-started/unit-testing/#bootstrapping-vuetify -
jest-fetch-mockusescross-fetchto globally set the fetch API and its interfaces (Request, Response, Headers) in order to mock API calls in jest. It importscross-fetchusingrequire(). However, because Babel 6 killed the commonJS default export behavior, whenjest-fetch-mockimportscross-fetchit attempts to access the interfaces like so,require('cross-fetch').Requestwhen it should berequire('cross-fetch').default.Request. Using babel-plugin-add-module-exports we can bring back the babel 5 behavior that will allowrequire('cross-fetch').Requestto work. -
The
jest-fetch-mockpackage doesn't seem to work in this application for unit-testing. Attempting to mock a json response results in jest throwingTypeError: response.json is not a function.