How can I include my test code under the "Files changed" tab

I have successfully issued a pull request, and on my pull request page there is a “Files changed” tab, which includes the edits I made to the file. 

In this section I want to also include my test code that I used to test my edits.

How do I do this?

The tab represents all changes that were made in all commits that are part of the PR. Just make sure you commit the changes you made to the files you used to test (and also make sure that those commits are part of the PR) and they will be included. There is no manual way to add files there.

OK, so once I’ve already issued a PR and it’s up, how can I then create another commit as part of this PR so that my test code can be seen?

Just push more commits towards the branch you want to merge into another branch. The PR will automatically update.

(I have the test code as a file on my git account.)