[loader] Test correct order with condition set to load `before`

Adding tests for conditional modules that use `when: 'before'`.