forked from mirrors/forgejo
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/10662 - create the modules/testimport/import.go to centralize blank import needed for tests (in order to run the init() function) to simplify maintenance - remove the imports that are not needed Co-authored-by: limiting-factor <limiting-factor@posteo.com> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10672 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
21 lines
426 B
Go
21 lines
426 B
Go
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package templates_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"forgejo.org/models/unittest"
|
|
"forgejo.org/modules/markup"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
markup.Init(&markup.ProcessorHelper{
|
|
IsUsernameMentionable: func(ctx context.Context, username string) bool {
|
|
return username == "mention-user"
|
|
},
|
|
})
|
|
unittest.MainTest(m)
|
|
}
|