rafoli / liferay-sample-workspace

2 stars 7 forks source link

Feature/unit tests #67

Closed elmanoneto closed 3 years ago

elmanoneto commented 3 years ago

https://services.liferay.com/browse/INLSW-36

rafoli commented 3 years ago

hi @elmanoneto , I'm getting sh: jest: command not found when testing your modules. Is there any additional config I should execute?

elmanoneto commented 3 years ago

hey @rafoli , you should run yarn or npm install to install miss libraries. Do you should too to change service urls to Mockoon url (we need to create environments for separate dev/test)

elmanoneto commented 3 years ago

Hi @rafoli , I've removed the unnecessary files. If you want to run unit tests, you should:

You need to run Mockmoon before in port 3001, and import config files from the mockmoon folder. After that, you'll need to run the following commands: yarn and yarn test.

rafoli commented 3 years ago

hey @elmanoneto , the build process is not working for me

ReferenceError: SampleWorkspace is not defined

       5 |
       6 | const api = axios.create({
    >  7 |     baseURL: SampleWorkspace.baseUrl,
         |              ^
       8 |     params: {
       9 |         "p_auth": window.Liferay.authToken
      10 |     },
sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information