require.context is a webpack built-in function that receives a directory to execute a search, a Boolean flag indicating whether subdirectories are included in this search, and a regular expression for the pattern matching for the filename (all as arguments).
When the building process starts, webpack will search for all the require.context functions, and will pre-execute them, so the files needed on the import will be there for the final build.
In our case, we passed ./modules for the folder, false to not search in subdirectories, and /^(?!.*test).*\.js$/is as the Regex to search for .js files and ignore the files that have .test in their names.
Then, the function will search for the files and will pass the result through a for loop to add the content of the files in the array of vuex modules.