|
Run in order to run tests more easily.Copy the two new scripts above. This will run the command using the configuration file you created above. This will run the command using the configuration file you created in the mode. This will open a browser with tools for search filtering and viewing test results. File Nesting Settings in File Nesting Options Nested File Validation Function Returns List of Tags The first test will ensure that the return value of the function is an array of tags. Add a new test within a block of this function Copy the test above Do the following Mock the response of the function Call the function Make sure the response of the function is equal to the expected mock response This test is important because it specifically tests the expected results of the function.
Note If you are not sure what a specific met hod does, please refer to the documentation. If you run now you should see that the test passes successfully. Verify that the function only creat photo editing servies es tags that do not yet exist The next test planned above will verify that the function does not create duplicate tags in the database. This function provides a list of strings representing tag names. The function first checks for existing tags with these names and creates only new tags based on the resulting filter. The test should simulate the first call to return a single label. This indicates that an existing label was found based on the name supplied to the function. Called using three tag names. A name should be the name of an existing tag that is being simulated. Make sure to provide only two unmatched tags.

Add the following test below the previous test inside the function block. Copying it and running it again should now show you that both tests passed. Verify that the function gives new labels a random color. In the next test you will need to verify that whenever a new label is created, it is given a new random color. To do this, write a basic test that inserts three new tags. After calling this function you can ensure that the function is called times. The code snippet below shows what this test should look like. Adding the new test below the previous test you wrote If this function changes in the future, this test ensures that the results of the function remain as expected.
|
|